Compare commits

..

4 Commits

Author SHA1 Message Date
Kenneth Reitz e104d36785 sub-env 2014-08-01 16:37:00 -04:00
Kenneth Reitz 1786231a49 move requirements to home directory first. 2014-08-01 16:34:53 -04:00
Kenneth Reitz e860234d05 fix for pip-grep 2014-08-01 15:15:37 -04:00
Kenneth Reitz 50d61d2935 moving things around 2014-08-01 15:12:19 -04:00
5 changed files with 52 additions and 3 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ source $BIN_DIR/steps/pylibmc
source $BIN_DIR/steps/pip-install
# Django collectstatic support.
source $BIN_DIR/steps/collectstatic
sub-env $BIN_DIR/steps/collectstatic
# ### Finalize
+5 -1
View File
@@ -3,7 +3,11 @@ set +e
bpwatch start pip_uninstall
if [[ -f .heroku/python/requirements-declared.txt ]]; then
pip-diff --stale .heroku/python/requirements-declared.txt requirements.txt > .heroku/python/requirements-stale.txt
cp .heroku/python/requirements-declared.txt requirements-declared.txt
pip-diff --stale requirements-declared.txt requirements.txt > .heroku/python/requirements-stale.txt
rm -fr requirements-declared.txt
if [[ -s .heroku/python/requirements-stale.txt ]]; then
puts-step "Uninstalling stale dependencies"
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/vendor/
OUT_PREFIX=$1
# fail hard
set -o pipefail
# fail harder
set -eux
DEFAULT_VERSION="1.0.18"
dep_version=${VERSION:-$DEFAULT_VERSION}
dep_dirname=libmemcached-${dep_version}
dep_archive_name=${dep_dirname}.tar.gz
dep_url=https://launchpad.net/libmemcached/1.0/${dep_version}/+download/${dep_archive_name}
# SASL Support.
echo "-----> Building cyrus-sasl 2.1.26..."
curl -LO ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
# FTP doesn't play well with piping into tar xz
tar xzf cyrus-sasl-2.1.26.tar.gz
pushd cyrus-sasl-2.1.26
./configure --prefix=${OUT_PREFIX}
make -s -j 9
make install -s
popd
echo "-----> Building libmemcached ${dep_version}..."
curl -L ${dep_url} | tar xz
pushd ${dep_dirname}
CPPFLAGS=-I${OUT_PREFIX}/include LDFLAGS=-L${OUT_PREFIX}/lib ./configure --prefix=${OUT_PREFIX} --without-memcached
make -s -j 9
make install -s
popd
echo "-----> Done."
+7 -1
View File
@@ -39,8 +39,10 @@ def grep(reqfile, packages, silent=False):
try:
r = Requirements(reqfile)
except ValueError:
if not silent:
print 'There was a problem loading the given requirement file.'
exit(os.EX_NOINPUT)
for requirement in r.requirements:
@@ -48,11 +50,15 @@ def grep(reqfile, packages, silent=False):
if requirement.req:
if requirement.req.project_name in packages:
if not silent:
print 'Package {} found!'.format(requirement.req.project_name)
exit(0)
print 'Not found.'.format(requirement.req.project_name)
if not silent:
print 'Not found.'.format(requirement.req.project_name)
exit(1)