mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2bc071b323 | |||
| 5c74244695 | |||
| 4e877e4f11 | |||
| 51ec7e3741 | |||
| 1f983fea40 | |||
| a26f0374ec | |||
| a0029a8411 |
@@ -150,6 +150,9 @@ mkdir -p $(dirname $PROFILE_PATH)
|
|||||||
# Install Python.
|
# Install Python.
|
||||||
source $BIN_DIR/steps/python
|
source $BIN_DIR/steps/python
|
||||||
|
|
||||||
|
# Sanity check for setuptools/distribute.
|
||||||
|
source $BIN_DIR/steps/setuptools
|
||||||
|
|
||||||
# Uninstall removed dependencies with Pip.
|
# Uninstall removed dependencies with Pip.
|
||||||
source $BIN_DIR/steps/pip-uninstall
|
source $BIN_DIR/steps/pip-uninstall
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ source $BIN_DIR/utils
|
|||||||
bpwatch start libffi_install
|
bpwatch start libffi_install
|
||||||
|
|
||||||
# If pylibmc exists within requirements, use vendored cryptography.
|
# If pylibmc exists within requirements, use vendored cryptography.
|
||||||
if (pip-grep -s requirements.txt cffi pylibmc) then
|
if (pip-grep -s requirements.txt cffi crytography &> /dev/null) then
|
||||||
|
|
||||||
if [ -d ".heroku/vendor/lib/libffi-3.1.1" ]; then
|
if [ -d ".heroku/vendor/lib/libffi-3.1.1" ]; then
|
||||||
export LIBFFI=$(pwd)/vendor
|
export LIBFFI=$(pwd)/vendor
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ source $BIN_DIR/utils
|
|||||||
bpwatch start pylibmc_install
|
bpwatch start pylibmc_install
|
||||||
|
|
||||||
# If pylibmc exists within requirements, use vendored libmemcached.
|
# If pylibmc exists within requirements, use vendored libmemcached.
|
||||||
if (pip-grep -s requirements.txt pylibmc) then
|
if (pip-grep -s requirements.txt pylibmc &> /dev/null) then
|
||||||
|
|
||||||
if [ -d ".heroku/vendor/lib/sasl2" ]; then
|
if [ -d ".heroku/vendor/lib/sasl2" ]; then
|
||||||
export LIBMEMCACHED=$(pwd)/vendor
|
export LIBMEMCACHED=$(pwd)/vendor
|
||||||
|
|||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Syntax sugar.
|
||||||
|
source $BIN_DIR/utils
|
||||||
|
|
||||||
|
if (pip-grep -s requirements.txt setuptools distribute &> /dev/null) then
|
||||||
|
|
||||||
|
puts-warn 'The package setuptools/distribute is listed in requirements.txt.'
|
||||||
|
puts-warn 'Please remove to ensure expected behavior. '
|
||||||
|
|
||||||
|
fi
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Use new path, containing autoconf.
|
||||||
|
export PATH="/app/.heroku/python/bin/:$PATH"
|
||||||
|
hash -r
|
||||||
|
|
||||||
|
|
||||||
|
echo "Building libffi..."
|
||||||
|
|
||||||
|
SOURCE_TARBALL='http://cl.ly/2s1t1u3v0N0I/download/libffi-3.1.tar'
|
||||||
|
|
||||||
|
curl -L $SOURCE_TARBALL | tar x
|
||||||
|
|
||||||
|
cd libffi-3.1
|
||||||
|
./configure --prefix=$OUT_PREFIX --disable-static &&
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
cd ..
|
||||||
Vendored
+1
-1
@@ -10,7 +10,7 @@ hash -r
|
|||||||
|
|
||||||
echo "Building libffi..."
|
echo "Building libffi..."
|
||||||
|
|
||||||
SOURCE_TARBALL='http://cl.ly/2s1t1u3v0N0I/download/libffi-3.1.tar'
|
SOURCE_TARBALL='ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz'
|
||||||
|
|
||||||
curl -L $SOURCE_TARBALL | tar x
|
curl -L $SOURCE_TARBALL | tar x
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Build Path: /app/.heroku/python/
|
# Build Path: /app/.heroku/python/
|
||||||
# Build Deps: libraries/sqlite
|
# Build Deps: libraries/sqlite, libraries/libffi
|
||||||
|
|
||||||
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
-3
@@ -79,18 +79,18 @@ def diff(r1, r2, include_fresh=False, include_stale=False):
|
|||||||
r1 = Requirements(r1)
|
r1 = Requirements(r1)
|
||||||
r2 = Requirements(r2)
|
r2 = Requirements(r2)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print 'There was a problem loading the given requirements files.'
|
print('There was a problem loading the given requirements files.')
|
||||||
exit(os.EX_NOINPUT)
|
exit(os.EX_NOINPUT)
|
||||||
|
|
||||||
results = r1.diff(r2, ignore_versions=True)
|
results = r1.diff(r2, ignore_versions=True)
|
||||||
|
|
||||||
if include_fresh:
|
if include_fresh:
|
||||||
for line in results['fresh']:
|
for line in results['fresh']:
|
||||||
print line.project_name if include_versions else line
|
print(line.project_name if include_versions else line)
|
||||||
|
|
||||||
if include_stale:
|
if include_stale:
|
||||||
for line in results['stale']:
|
for line in results['stale']:
|
||||||
print line.project_name if include_versions else line
|
print(line.project_name if include_versions else line)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
-3
@@ -41,7 +41,7 @@ def grep(reqfile, packages, silent=False):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
||||||
if not silent:
|
if not silent:
|
||||||
print 'There was a problem loading the given requirement file.'
|
print('There was a problem loading the given requirement file.')
|
||||||
|
|
||||||
exit(os.EX_NOINPUT)
|
exit(os.EX_NOINPUT)
|
||||||
|
|
||||||
@@ -52,12 +52,12 @@ def grep(reqfile, packages, silent=False):
|
|||||||
if requirement.req.project_name in packages:
|
if requirement.req.project_name in packages:
|
||||||
|
|
||||||
if not silent:
|
if not silent:
|
||||||
print 'Package {} found!'.format(requirement.req.project_name)
|
print('Package {} found!'.format(requirement.req.project_name))
|
||||||
|
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
if not silent:
|
if not silent:
|
||||||
print 'Not found.'.format(requirement.req.project_name)
|
print('Not found.'.format(requirement.req.project_name))
|
||||||
|
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user