mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2932bad488 |
@@ -1,17 +1,5 @@
|
|||||||
# Python Buildpack Changelog
|
# Python Buildpack Changelog
|
||||||
|
|
||||||
## v83
|
|
||||||
|
|
||||||
Support for Heroku CI.
|
|
||||||
|
|
||||||
- Cffi support for argon2
|
|
||||||
|
|
||||||
## v82 (2016-08-22)
|
|
||||||
|
|
||||||
Update to library detection mechnisms (pip-pop).
|
|
||||||
|
|
||||||
- Updated setuptools to v25.5.0
|
|
||||||
|
|
||||||
## v81 (2016-06-28)
|
## v81 (2016-06-28)
|
||||||
|
|
||||||
Updated default Python to 2.7.11.
|
Updated default Python to 2.7.11.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||

|
-
|
||||||
|
|
||||||
# Heroku Buildpack: Python
|
# Heroku Buildpack: Python
|
||||||
|
|
||||||
@@ -51,4 +51,5 @@ Runtime options include:
|
|||||||
- `python-2.7.12`
|
- `python-2.7.12`
|
||||||
- `python-3.5.2`
|
- `python-3.5.2`
|
||||||
- `pypy-5.3.1` (unsupported, experimental)
|
- `pypy-5.3.1` (unsupported, experimental)
|
||||||
- `pypy3-2.4.0` (unsupported, experimental)
|
|
||||||
|
Other [unsupported runtimes](https://github.com/heroku/heroku-buildpack-python/tree/master/builds/runtimes) are available as well. Use at your own risk.
|
||||||
|
|||||||
+5
-7
@@ -35,7 +35,7 @@ DEFAULT_PYTHON_VERSION="python-2.7.12"
|
|||||||
DEFAULT_PYTHON_STACK="cedar-14"
|
DEFAULT_PYTHON_STACK="cedar-14"
|
||||||
PYTHON_EXE="/app/.heroku/python/bin/python"
|
PYTHON_EXE="/app/.heroku/python/bin/python"
|
||||||
PIP_VERSION="8.1.2"
|
PIP_VERSION="8.1.2"
|
||||||
SETUPTOOLS_VERSION="25.2.0"
|
SETUPTOOLS_VERSION="23.1.0"
|
||||||
|
|
||||||
# Common Problem Warnings
|
# Common Problem Warnings
|
||||||
export WARNINGS_LOG=$(mktemp)
|
export WARNINGS_LOG=$(mktemp)
|
||||||
@@ -54,10 +54,9 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
|
|||||||
[ ! "$SLUG_ID" ] && SLUG_ID="defaultslug"
|
[ ! "$SLUG_ID" ] && SLUG_ID="defaultslug"
|
||||||
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
|
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
|
||||||
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
|
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
|
||||||
[[ $BUILD_DIR == "/app" ]] && SKIP_MOVE_BUILD=1
|
|
||||||
|
|
||||||
# Sanitizing environment variables.
|
# Sanitizing environment variables.
|
||||||
unset GIT_DIR PYTHONHOME PYTHONPATH
|
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
|
||||||
unset RECEIVE_DATA RUN_KEY BUILD_INFO DEPLOY LOG_TOKEN DYNO
|
unset RECEIVE_DATA RUN_KEY BUILD_INFO DEPLOY LOG_TOKEN DYNO
|
||||||
unset CYTOKINE_LOG_FILE GEM_PATH
|
unset CYTOKINE_LOG_FILE GEM_PATH
|
||||||
|
|
||||||
@@ -79,7 +78,7 @@ APP_DIR='/app'
|
|||||||
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
||||||
|
|
||||||
# Skip these steps for Docker.
|
# Skip these steps for Docker.
|
||||||
if [[ ! "$SKIP_MOVE_BUILD" ]]; then
|
if [[ ! "$DOCKER_BUILD" ]]; then
|
||||||
|
|
||||||
# Copy Anvil app dir to temporary storage...
|
# Copy Anvil app dir to temporary storage...
|
||||||
bpwatch start anvil_appdir_stage
|
bpwatch start anvil_appdir_stage
|
||||||
@@ -104,11 +103,10 @@ BUILD_DIR=$APP_DIR
|
|||||||
|
|
||||||
# Set up outputs under new context
|
# Set up outputs under new context
|
||||||
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
|
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
|
||||||
EXPORT_PATH="$BIN_DIR/../export"
|
|
||||||
GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
|
GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
|
||||||
|
|
||||||
# We'll need to send these statics to other scripts we `source`.
|
# We'll need to send these statics to other scripts we `source`.
|
||||||
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH EXPORT_PATH
|
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
|
||||||
|
|
||||||
# Prepend proper environment variables for Python use.
|
# Prepend proper environment variables for Python use.
|
||||||
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
|
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
|
||||||
@@ -254,7 +252,7 @@ bpwatch start dump_cache
|
|||||||
bpwatch stop dump_cache
|
bpwatch stop dump_cache
|
||||||
|
|
||||||
# Fin.
|
# Fin.
|
||||||
if [[ ! "$SKIP_MOVE_BUILD" ]]; then
|
if [[ ! "$DOCKER_BUILD" ]]; then
|
||||||
|
|
||||||
bpwatch start appdir_commit
|
bpwatch start appdir_commit
|
||||||
deep-rm $ORIG_BUILD_DIR
|
deep-rm $ORIG_BUILD_DIR
|
||||||
|
|||||||
@@ -20,16 +20,18 @@ source $BIN_DIR/utils
|
|||||||
bpwatch start libffi_install
|
bpwatch start libffi_install
|
||||||
|
|
||||||
# If a package using cffi exists within requirements, use vendored libffi.
|
# If a package using cffi exists within requirements, use vendored libffi.
|
||||||
if (pip-grep -s requirements.txt argon2-cffi bcrypt cffi cryptography django[argon2] Django[argon2] django[bcrypt] Django[bcrypt] PyNaCl pyOpenSSL PyOpenSSL requests[security] misaka &> /dev/null) then
|
if (pip-grep -s requirements.txt bcrypt cffi cryptography django[bcrypt] Django[bcrypt] PyNaCl pyOpenSSL PyOpenSSL requests[security] misaka &> /dev/null) then
|
||||||
|
|
||||||
if [ ! -d ".heroku/vendor/lib/libffi-3.1" ]; then
|
if [ -d ".heroku/vendor/lib/libffi-3.1.1" ]; then
|
||||||
|
export LIBFFI=$(pwd)/vendor
|
||||||
|
else
|
||||||
echo "-----> Noticed cffi. Bootstrapping libffi."
|
echo "-----> Noticed cffi. Bootstrapping libffi."
|
||||||
mkdir -p .heroku/vendor
|
mkdir -p .heroku/vendor
|
||||||
# Download and extract libffi into target vendor directory.
|
# Download and extract libffi into target vendor directory.
|
||||||
curl $VENDORED_LIBFFI -s | tar zxv -C .heroku/vendor &> /dev/null
|
curl $VENDORED_LIBFFI -s | tar zxv -C .heroku/vendor &> /dev/null
|
||||||
fi
|
|
||||||
|
|
||||||
export LIBFFI=$(pwd)/vendor
|
export LIBFFI=$(pwd)/vendor
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bpwatch stop libffi_install
|
bpwatch stop libffi_install
|
||||||
|
|||||||
+5
-3
@@ -22,14 +22,16 @@ bpwatch start gdal_install
|
|||||||
# If GDAL exists within requirements, use vendored gdal.
|
# If GDAL exists within requirements, use vendored gdal.
|
||||||
if (pip-grep -s requirements.txt GDAL gdal pygdal &> /dev/null) then
|
if (pip-grep -s requirements.txt GDAL gdal pygdal &> /dev/null) then
|
||||||
|
|
||||||
if [ ! -f ".heroku/vendor/bin/gdalserver" ]; then
|
if [ -f ".heroku/vendor/bin/gdalserver" ]; then
|
||||||
|
export GDAL=$(pwd)/vendor
|
||||||
|
else
|
||||||
echo "-----> Noticed GDAL. Bootstrapping gdal."
|
echo "-----> Noticed GDAL. Bootstrapping gdal."
|
||||||
mkdir -p .heroku/vendor
|
mkdir -p .heroku/vendor
|
||||||
# Download and extract cryptography into target vendor directory.
|
# Download and extract cryptography into target vendor directory.
|
||||||
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null
|
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null
|
||||||
fi
|
|
||||||
|
|
||||||
export GDAL=$(pwd)/vendor
|
export GDAL=$(pwd)/vendor
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bpwatch stop gdal_install
|
bpwatch stop gdal_install
|
||||||
|
|||||||
+5
-3
@@ -24,16 +24,18 @@ bpwatch start geo_libs_install
|
|||||||
# If GDAL exists within requirements, use vendored gdal.
|
# If GDAL exists within requirements, use vendored gdal.
|
||||||
if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then
|
if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then
|
||||||
|
|
||||||
if [ ! -f ".heroku/vendor/bin/proj" ]; then
|
if [ -f ".heroku/vendor/bin/gdalserver" ]; then
|
||||||
|
export GDAL=$(pwd)/vendor
|
||||||
|
else
|
||||||
echo "-----> Bootstrapping gdal, geos, proj."
|
echo "-----> Bootstrapping gdal, geos, proj."
|
||||||
mkdir -p .heroku/vendor
|
mkdir -p .heroku/vendor
|
||||||
# Download and extract cryptography into target vendor directory.
|
# Download and extract cryptography into target vendor directory.
|
||||||
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null
|
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null
|
||||||
curl $VENDORED_GEOS -s | tar zxv -C .heroku/vendor &> /dev/null
|
curl $VENDORED_GEOS -s | tar zxv -C .heroku/vendor &> /dev/null
|
||||||
curl $VENDORED_PROJ -s | tar zxv -C .heroku/vendor &> /dev/null
|
curl $VENDORED_PROJ -s | tar zxv -C .heroku/vendor &> /dev/null
|
||||||
fi
|
|
||||||
|
|
||||||
export GDAL=$(pwd)/vendor
|
export GDAL=$(pwd)/vendor
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bpwatch stop geo_libs_install
|
bpwatch stop geo_libs_install
|
||||||
|
|||||||
+5
-3
@@ -21,14 +21,16 @@ 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 &> /dev/null) 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
|
||||||
|
else
|
||||||
echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
|
echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
|
||||||
mkdir -p .heroku/vendor
|
mkdir -p .heroku/vendor
|
||||||
# Download and extract libmemcached into target vendor directory.
|
# Download and extract libmemcached into target vendor directory.
|
||||||
curl $VENDORED_MEMCACHED -s | tar zxv -C .heroku/vendor &> /dev/null
|
curl $VENDORED_MEMCACHED -s | tar zxv -C .heroku/vendor &> /dev/null
|
||||||
fi
|
|
||||||
|
|
||||||
export LIBMEMCACHED=$(pwd)/vendor
|
export LIBMEMCACHED=$(pwd)/vendor
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bpwatch stop pylibmc_install
|
bpwatch stop pylibmc_install
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create a Heroku app with the following buildpack:
|
||||||
|
# https://github.com/ddollar/buildpack-test
|
||||||
|
#
|
||||||
|
# Push this Python buildpack to that Heroku app to
|
||||||
|
# run the tests.
|
||||||
|
#
|
||||||
|
|
||||||
|
testDetectWithReqs() {
|
||||||
|
detect "simple-requirements"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectWithEmptyReqs() {
|
||||||
|
detect "empty-requirements"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectDjango16() {
|
||||||
|
detect "django-1.6-skeleton"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectDjango15() {
|
||||||
|
detect "django-1.5-skeleton"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectDjango14() {
|
||||||
|
detect "django-1.4-skeleton"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectDjango13() {
|
||||||
|
detect "django-1.3-skeleton"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectNotDjangoWithSettings() {
|
||||||
|
detect "not-django"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectWithSetupPy() {
|
||||||
|
detect "distutils"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectWithSetupRequires() {
|
||||||
|
detect "no-requirements"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectNotPython() {
|
||||||
|
detect "not-python"
|
||||||
|
assertNotCaptured "Python"
|
||||||
|
assertEquals "1" "${RETURN}"
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectSimpleRuntimePypy2() {
|
||||||
|
detect "simple-runtime-pypy2"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectSimpleRuntimePython2() {
|
||||||
|
detect "simple-runtime-python2"
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testDetectSimpleRuntimePython3() {
|
||||||
|
detect "simple-runtime" # should probably be renamed simple-runtime-python3
|
||||||
|
assertCapturedEquals "Python"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
## utils ########################################
|
||||||
|
|
||||||
|
pushd $(dirname 0) >/dev/null
|
||||||
|
BASE=$(pwd)
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
source ${BASE}/vendor/test-utils
|
||||||
|
|
||||||
|
detect() {
|
||||||
|
capture ${BASE}/bin/detect ${BASE}/test/$1
|
||||||
|
}
|
||||||
|
|
||||||
|
compile() {
|
||||||
|
capture ${BASE}/bin/compile ${BASE}/test/$1
|
||||||
|
}
|
||||||
|
|
||||||
|
source ${BASE}/vendor/shunit2
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Syntax sugar.
|
|
||||||
BIN_DIR=$(cd $(dirname $0); pwd) # absolute path
|
|
||||||
source $BIN_DIR/utils
|
|
||||||
|
|
||||||
DISABLE_COLLECTSTATIC=1 "$(dirname ${0:-})/compile" "$1" "$2" "$3"
|
|
||||||
|
|
||||||
if [[ -f "$1/requirements-test.txt" ]]; then
|
|
||||||
/app/.heroku/python/bin/pip install -r "$1/requirements-test.txt" --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | cleanup | indent
|
|
||||||
fi
|
|
||||||
@@ -39,13 +39,11 @@ puts-cmd() {
|
|||||||
# Usage: $ set-env key value
|
# Usage: $ set-env key value
|
||||||
set-env() {
|
set-env() {
|
||||||
echo "export $1=$2" >> $PROFILE_PATH
|
echo "export $1=$2" >> $PROFILE_PATH
|
||||||
echo "export $1=$2" >> $EXPORT_PATH
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: $ set-default-env key value
|
# Usage: $ set-default-env key value
|
||||||
set-default-env() {
|
set-default-env() {
|
||||||
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
|
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
|
||||||
echo "export $1=\${$1:-$2}" >> $EXPORT_PATH
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usage: $ un-set-env key
|
# Usage: $ un-set-env key
|
||||||
|
|||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.7-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-1.7/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-1.8/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-1.9/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.0/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.0.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.0.1/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.0.2-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.0.2/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.1/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.2-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.2.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite, libraries/libffi
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.3-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.3.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.3.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.4.0-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.5.0-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.5.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.6.0-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.6.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-4.0.0-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-4.0.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-5.0.0-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-5.0.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.0-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-5.1.0-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.1.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-5.1.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
OUT_PREFIX=$1
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
echo "Building PyPy..."
|
echo "Building PyPy..."
|
||||||
SOURCE_TARBALL='https://bbuseruploads.s3.amazonaws.com/54220cd1-b139-4188-9455-1e13e663f1ac/downloads/265504fc-8c03-4c1d-935a-2b8fbc6da51a/pypy2-v5.3.1-linux64.tar.bz2?Signature=F%2FnnB39QrCTPldSErIJoqzAt8YA%3D&Expires=1471612628&AWSAccessKeyId=AKIAIWY5XSVPZPDQYRQQ&versionId=kJjoDTh5eNcLrGrt5hYT0_5XGjg3.gl0&response-content-disposition=attachment%3B%20filename%3D%22pypy2-v5.3.1-linux64.tar.bz2%22'
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.3.1-linux64.tar.bz2'
|
||||||
curl -L $SOURCE_TARBALL | tar jx
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
cp -R pypy2-v5.3.1-linux64/* $OUT_PREFIX
|
cp -R pypy-5.3.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
|
|||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3-2.3.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy3-2.3.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.4 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.4.4/Python-2.4.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.4.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.4 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.4.5/Python-2.4.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.4.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.4 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.4.6/Python-2.4.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.4.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5/Python-2.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5.1/Python-2.5.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5.2/Python-2.5.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5.3/Python-2.5.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5.4/Python-2.5.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5.5/Python-2.5.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.5 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.5.6/Python-2.5.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.5.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar stack, not cedar-14.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://www.python.org/ftp/python/2.6/Python-2.6.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
mv Python-2.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar stack, not cedar-14.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.1/Python-2.6.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.2/Python-2.6.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.3/Python-2.6.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.4/Python-2.6.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.5/Python-2.6.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.6/Python-2.6.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.7/Python-2.6.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.8/Python-2.6.8.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.8 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
# Protect 2.6 builds from parent Python (causes segfault during build).
|
||||||
|
unset LANG PYTHONHOME PYTHONPATH
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.6.9/Python-2.6.9.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.6.9 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7/Python-2.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.1/Python-2.7.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.2/Python-2.7.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.3/Python-2.7.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.4/Python-2.7.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.5/Python-2.7.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.6/Python-2.7.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.7/Python-2.7.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.7/Python-2.7.7.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.7 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.8/Python-2.7.8.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.8 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/2.7.8/Python-2.7.8.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-2.7.8 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.1/Python-3.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.1.1/Python-3.1.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.1.2/Python-3.1.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.1.3/Python-3.1.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.1.4/Python-3.1.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.1.5/Python-3.1.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.1.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.2/Python-3.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.2.1/Python-3.2.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.2.2/Python-3.2.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.2.3/Python-3.2.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.2.4/Python-3.2.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.2.5/Python-3.2.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.2.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.0/Python-3.3.0.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.0 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.1/Python-3.3.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.2/Python-3.3.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.3/Python-3.3.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.4/Python-3.3.4.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.4 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.5/Python-3.3.5.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.5 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.3.6/Python-3.3.6.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.3.6 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.4.0/Python-3.4.0.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.4.0 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.4.1/Python-3.4.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.4.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.4.2/Python-3.4.2.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.4.2 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.4.3/Python-3.4.3.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.4.3 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.5.0/Python-3.5.0.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.5.0 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building Python..."
|
||||||
|
SOURCE_TARBALL='https://python.org/ftp/python/3.5.1/Python-3.5.1.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.5.1 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
@@ -14,5 +14,5 @@ cd src
|
|||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
# ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
|
|||||||
Vendored
+13
-10
@@ -18,7 +18,6 @@ from pip._vendor.requests import session
|
|||||||
|
|
||||||
requests = session()
|
requests = session()
|
||||||
|
|
||||||
|
|
||||||
class Requirements(object):
|
class Requirements(object):
|
||||||
def __init__(self, reqfile=None):
|
def __init__(self, reqfile=None):
|
||||||
super(Requirements, self).__init__()
|
super(Requirements, self).__init__()
|
||||||
@@ -32,15 +31,13 @@ class Requirements(object):
|
|||||||
return '<Requirements \'{}\'>'.format(self.path)
|
return '<Requirements \'{}\'>'.format(self.path)
|
||||||
|
|
||||||
def load(self, reqfile):
|
def load(self, reqfile):
|
||||||
|
|
||||||
if not os.path.exists(reqfile):
|
if not os.path.exists(reqfile):
|
||||||
raise ValueError('The given requirements file does not exist.')
|
raise ValueError('The given requirements file does not exist.')
|
||||||
|
|
||||||
finder = PackageFinder([], [], session=requests)
|
finder = PackageFinder([], [], session=requests)
|
||||||
for requirement in parse_requirements(reqfile, finder=finder, session=requests):
|
for requirement in parse_requirements(reqfile, finder=finder, session=requests):
|
||||||
if requirement.req:
|
if requirement.req:
|
||||||
if not getattr(requirement.req, 'name', None):
|
|
||||||
# Prior to pip 8.1.2 the attribute `name` did not exist.
|
|
||||||
requirement.req.name = requirement.req.project_name
|
|
||||||
self.requirements.append(requirement.req)
|
self.requirements.append(requirement.req)
|
||||||
|
|
||||||
|
|
||||||
@@ -51,24 +48,24 @@ class Requirements(object):
|
|||||||
|
|
||||||
# Generate fresh packages.
|
# Generate fresh packages.
|
||||||
other_reqs = (
|
other_reqs = (
|
||||||
[r.name for r in r1.requirements]
|
[r.project_name for r in r1.requirements]
|
||||||
if ignore_versions else r1.requirements
|
if ignore_versions else r1.requirements
|
||||||
)
|
)
|
||||||
|
|
||||||
for req in r2.requirements:
|
for req in r2.requirements:
|
||||||
r = req.name if ignore_versions else req
|
r = req.project_name if ignore_versions else req
|
||||||
|
|
||||||
if r not in other_reqs and r not in excludes:
|
if r not in other_reqs and r not in excludes:
|
||||||
results['fresh'].append(req)
|
results['fresh'].append(req)
|
||||||
|
|
||||||
# Generate stale packages.
|
# Generate stale packages.
|
||||||
other_reqs = (
|
other_reqs = (
|
||||||
[r.name for r in r2.requirements]
|
[r.project_name for r in r2.requirements]
|
||||||
if ignore_versions else r2.requirements
|
if ignore_versions else r2.requirements
|
||||||
)
|
)
|
||||||
|
|
||||||
for req in r1.requirements:
|
for req in r1.requirements:
|
||||||
r = req.name if ignore_versions else req
|
r = req.project_name if ignore_versions else req
|
||||||
|
|
||||||
if r not in other_reqs and r not in excludes:
|
if r not in other_reqs and r not in excludes:
|
||||||
results['stale'].append(req)
|
results['stale'].append(req)
|
||||||
@@ -76,7 +73,11 @@ class Requirements(object):
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None):
|
def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None):
|
||||||
|
|
||||||
include_versions = True if include_stale else False
|
include_versions = True if include_stale else False
|
||||||
excludes = excludes if len(excludes) else []
|
excludes = excludes if len(excludes) else []
|
||||||
|
|
||||||
@@ -91,11 +92,12 @@ def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None):
|
|||||||
|
|
||||||
if include_fresh:
|
if include_fresh:
|
||||||
for line in results['fresh']:
|
for line in results['fresh']:
|
||||||
print(line.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.name if include_versions else line)
|
print(line.project_name if include_versions else line)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -112,5 +114,6 @@ def main():
|
|||||||
diff(**kwargs)
|
diff(**kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Vendored
+19
-11
@@ -15,7 +15,6 @@ from pip._vendor.requests import session
|
|||||||
|
|
||||||
requests = session()
|
requests = session()
|
||||||
|
|
||||||
|
|
||||||
class Requirements(object):
|
class Requirements(object):
|
||||||
def __init__(self, reqfile=None):
|
def __init__(self, reqfile=None):
|
||||||
super(Requirements, self).__init__()
|
super(Requirements, self).__init__()
|
||||||
@@ -29,31 +28,38 @@ class Requirements(object):
|
|||||||
return '<Requirements \'{}\'>'.format(self.path)
|
return '<Requirements \'{}\'>'.format(self.path)
|
||||||
|
|
||||||
def load(self, reqfile):
|
def load(self, reqfile):
|
||||||
|
|
||||||
if not os.path.exists(reqfile):
|
if not os.path.exists(reqfile):
|
||||||
raise ValueError('The given requirements file does not exist.')
|
raise ValueError('The given requirements file does not exist.')
|
||||||
|
|
||||||
finder = PackageFinder([], [], session=requests)
|
finder = PackageFinder([], [], session=requests)
|
||||||
for requirement in parse_requirements(reqfile, finder=finder, session=requests):
|
for requirement in parse_requirements(reqfile, finder=finder, session=requests):
|
||||||
if requirement.req:
|
self.requirements.append(requirement)
|
||||||
if not getattr(requirement.req, 'name', None):
|
|
||||||
# Prior to pip 8.1.2 the attribute `name` did not exist.
|
|
||||||
requirement.req.name = requirement.req.project_name
|
|
||||||
self.requirements.append(requirement.req)
|
|
||||||
|
|
||||||
|
|
||||||
def grep(reqfile, packages, silent=False):
|
def grep(reqfile, packages, silent=False):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = Requirements(reqfile)
|
r = Requirements(reqfile)
|
||||||
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)
|
||||||
|
|
||||||
for req in r.requirements:
|
for requirement in r.requirements:
|
||||||
if req.name in packages:
|
|
||||||
if not silent:
|
if requirement.req:
|
||||||
print('Package {} found!'.format(req.name))
|
|
||||||
exit(0)
|
if requirement.req.project_name in packages:
|
||||||
|
|
||||||
|
if not silent:
|
||||||
|
print('Package {} found!'.format(requirement.req.project_name))
|
||||||
|
|
||||||
|
exit(0)
|
||||||
|
|
||||||
if not silent:
|
if not silent:
|
||||||
print('Not found.')
|
print('Not found.')
|
||||||
@@ -66,8 +72,10 @@ def main():
|
|||||||
|
|
||||||
kwargs = {'reqfile': args['<reqfile>'], 'packages': args['<package>'], 'silent': args['-s']}
|
kwargs = {'reqfile': args['<reqfile>'], 'packages': args['<package>'], 'silent': args['-s']}
|
||||||
|
|
||||||
|
|
||||||
grep(**kwargs)
|
grep(**kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
+315
@@ -0,0 +1,315 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import optparse
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
|
from pip.exceptions import InstallationError, CommandError, PipError
|
||||||
|
from pip.utils import get_installed_distributions, get_prog
|
||||||
|
from pip.utils import deprecation
|
||||||
|
from pip.vcs import git, mercurial, subversion, bazaar # noqa
|
||||||
|
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||||
|
from pip.commands import get_summaries, get_similar_commands
|
||||||
|
from pip.commands import commands_dict
|
||||||
|
from pip._vendor.requests.packages.urllib3.exceptions import (
|
||||||
|
InsecureRequestWarning,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# assignment for flake8 to be happy
|
||||||
|
|
||||||
|
# This fixes a peculiarity when importing via __import__ - as we are
|
||||||
|
# initialising the pip module, "from pip import cmdoptions" is recursive
|
||||||
|
# and appears not to work properly in that situation.
|
||||||
|
import pip.cmdoptions
|
||||||
|
cmdoptions = pip.cmdoptions
|
||||||
|
|
||||||
|
# The version as used in the setup.py and the docs conf.py
|
||||||
|
__version__ = "7.1.2"
|
||||||
|
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Hide the InsecureRequestWArning from urllib3
|
||||||
|
warnings.filterwarnings("ignore", category=InsecureRequestWarning)
|
||||||
|
|
||||||
|
|
||||||
|
def autocomplete():
|
||||||
|
"""Command and option completion for the main option parser (and options)
|
||||||
|
and its subcommands (and options).
|
||||||
|
|
||||||
|
Enable by sourcing one of the completion shell scripts (bash or zsh).
|
||||||
|
"""
|
||||||
|
# Don't complete if user hasn't sourced bash_completion file.
|
||||||
|
if 'PIP_AUTO_COMPLETE' not in os.environ:
|
||||||
|
return
|
||||||
|
cwords = os.environ['COMP_WORDS'].split()[1:]
|
||||||
|
cword = int(os.environ['COMP_CWORD'])
|
||||||
|
try:
|
||||||
|
current = cwords[cword - 1]
|
||||||
|
except IndexError:
|
||||||
|
current = ''
|
||||||
|
|
||||||
|
subcommands = [cmd for cmd, summary in get_summaries()]
|
||||||
|
options = []
|
||||||
|
# subcommand
|
||||||
|
try:
|
||||||
|
subcommand_name = [w for w in cwords if w in subcommands][0]
|
||||||
|
except IndexError:
|
||||||
|
subcommand_name = None
|
||||||
|
|
||||||
|
parser = create_main_parser()
|
||||||
|
# subcommand options
|
||||||
|
if subcommand_name:
|
||||||
|
# special case: 'help' subcommand has no options
|
||||||
|
if subcommand_name == 'help':
|
||||||
|
sys.exit(1)
|
||||||
|
# special case: list locally installed dists for uninstall command
|
||||||
|
if subcommand_name == 'uninstall' and not current.startswith('-'):
|
||||||
|
installed = []
|
||||||
|
lc = current.lower()
|
||||||
|
for dist in get_installed_distributions(local_only=True):
|
||||||
|
if dist.key.startswith(lc) and dist.key not in cwords[1:]:
|
||||||
|
installed.append(dist.key)
|
||||||
|
# if there are no dists installed, fall back to option completion
|
||||||
|
if installed:
|
||||||
|
for dist in installed:
|
||||||
|
print(dist)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
subcommand = commands_dict[subcommand_name]()
|
||||||
|
options += [(opt.get_opt_string(), opt.nargs)
|
||||||
|
for opt in subcommand.parser.option_list_all
|
||||||
|
if opt.help != optparse.SUPPRESS_HELP]
|
||||||
|
|
||||||
|
# filter out previously specified options from available options
|
||||||
|
prev_opts = [x.split('=')[0] for x in cwords[1:cword - 1]]
|
||||||
|
options = [(x, v) for (x, v) in options if x not in prev_opts]
|
||||||
|
# filter options by current input
|
||||||
|
options = [(k, v) for k, v in options if k.startswith(current)]
|
||||||
|
for option in options:
|
||||||
|
opt_label = option[0]
|
||||||
|
# append '=' to options which require args
|
||||||
|
if option[1]:
|
||||||
|
opt_label += '='
|
||||||
|
print(opt_label)
|
||||||
|
else:
|
||||||
|
# show main parser options only when necessary
|
||||||
|
if current.startswith('-') or current.startswith('--'):
|
||||||
|
opts = [i.option_list for i in parser.option_groups]
|
||||||
|
opts.append(parser.option_list)
|
||||||
|
opts = (o for it in opts for o in it)
|
||||||
|
|
||||||
|
subcommands += [i.get_opt_string() for i in opts
|
||||||
|
if i.help != optparse.SUPPRESS_HELP]
|
||||||
|
|
||||||
|
print(' '.join([x for x in subcommands if x.startswith(current)]))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def create_main_parser():
|
||||||
|
parser_kw = {
|
||||||
|
'usage': '\n%prog <command> [options]',
|
||||||
|
'add_help_option': False,
|
||||||
|
'formatter': UpdatingDefaultsHelpFormatter(),
|
||||||
|
'name': 'global',
|
||||||
|
'prog': get_prog(),
|
||||||
|
}
|
||||||
|
|
||||||
|
parser = ConfigOptionParser(**parser_kw)
|
||||||
|
parser.disable_interspersed_args()
|
||||||
|
|
||||||
|
pip_pkg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
parser.version = 'pip %s from %s (python %s)' % (
|
||||||
|
__version__, pip_pkg_dir, sys.version[:3])
|
||||||
|
|
||||||
|
# add the general options
|
||||||
|
gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
|
||||||
|
parser.add_option_group(gen_opts)
|
||||||
|
|
||||||
|
parser.main = True # so the help formatter knows
|
||||||
|
|
||||||
|
# create command listing for description
|
||||||
|
command_summaries = get_summaries()
|
||||||
|
description = [''] + ['%-27s %s' % (i, j) for i, j in command_summaries]
|
||||||
|
parser.description = '\n'.join(description)
|
||||||
|
|
||||||
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
def parseopts(args):
|
||||||
|
parser = create_main_parser()
|
||||||
|
|
||||||
|
# Note: parser calls disable_interspersed_args(), so the result of this
|
||||||
|
# call is to split the initial args into the general options before the
|
||||||
|
# subcommand and everything else.
|
||||||
|
# For example:
|
||||||
|
# args: ['--timeout=5', 'install', '--user', 'INITools']
|
||||||
|
# general_options: ['--timeout==5']
|
||||||
|
# args_else: ['install', '--user', 'INITools']
|
||||||
|
general_options, args_else = parser.parse_args(args)
|
||||||
|
|
||||||
|
# --version
|
||||||
|
if general_options.version:
|
||||||
|
sys.stdout.write(parser.version)
|
||||||
|
sys.stdout.write(os.linesep)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
# pip || pip help -> print_help()
|
||||||
|
if not args_else or (args_else[0] == 'help' and len(args_else) == 1):
|
||||||
|
parser.print_help()
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
# the subcommand name
|
||||||
|
cmd_name = args_else[0]
|
||||||
|
|
||||||
|
if cmd_name not in commands_dict:
|
||||||
|
guess = get_similar_commands(cmd_name)
|
||||||
|
|
||||||
|
msg = ['unknown command "%s"' % cmd_name]
|
||||||
|
if guess:
|
||||||
|
msg.append('maybe you meant "%s"' % guess)
|
||||||
|
|
||||||
|
raise CommandError(' - '.join(msg))
|
||||||
|
|
||||||
|
# all the args without the subcommand
|
||||||
|
cmd_args = args[:]
|
||||||
|
cmd_args.remove(cmd_name)
|
||||||
|
|
||||||
|
return cmd_name, cmd_args
|
||||||
|
|
||||||
|
|
||||||
|
def check_isolated(args):
|
||||||
|
isolated = False
|
||||||
|
|
||||||
|
if "--isolated" in args:
|
||||||
|
isolated = True
|
||||||
|
|
||||||
|
return isolated
|
||||||
|
|
||||||
|
|
||||||
|
def main(args=None):
|
||||||
|
if args is None:
|
||||||
|
args = sys.argv[1:]
|
||||||
|
|
||||||
|
# Enable our Deprecation Warnings
|
||||||
|
for deprecation_warning in deprecation.DEPRECATIONS:
|
||||||
|
warnings.simplefilter("default", deprecation_warning)
|
||||||
|
|
||||||
|
# Configure our deprecation warnings to be sent through loggers
|
||||||
|
deprecation.install_warning_logger()
|
||||||
|
|
||||||
|
autocomplete()
|
||||||
|
|
||||||
|
try:
|
||||||
|
cmd_name, cmd_args = parseopts(args)
|
||||||
|
except PipError as exc:
|
||||||
|
sys.stderr.write("ERROR: %s" % exc)
|
||||||
|
sys.stderr.write(os.linesep)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
command = commands_dict[cmd_name](isolated=check_isolated(cmd_args))
|
||||||
|
return command.main(cmd_args)
|
||||||
|
|
||||||
|
|
||||||
|
# ###########################################################
|
||||||
|
# # Writing freeze files
|
||||||
|
|
||||||
|
class FrozenRequirement(object):
|
||||||
|
|
||||||
|
def __init__(self, name, req, editable, comments=()):
|
||||||
|
self.name = name
|
||||||
|
self.req = req
|
||||||
|
self.editable = editable
|
||||||
|
self.comments = comments
|
||||||
|
|
||||||
|
_rev_re = re.compile(r'-r(\d+)$')
|
||||||
|
_date_re = re.compile(r'-(20\d\d\d\d\d\d)$')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dist(cls, dist, dependency_links, find_tags=False):
|
||||||
|
location = os.path.normcase(os.path.abspath(dist.location))
|
||||||
|
comments = []
|
||||||
|
from pip.vcs import vcs, get_src_requirement
|
||||||
|
if vcs.get_backend_name(location):
|
||||||
|
editable = True
|
||||||
|
try:
|
||||||
|
req = get_src_requirement(dist, location, find_tags)
|
||||||
|
except InstallationError as exc:
|
||||||
|
logger.warning(
|
||||||
|
"Error when trying to get requirement for VCS system %s, "
|
||||||
|
"falling back to uneditable format", exc
|
||||||
|
)
|
||||||
|
req = None
|
||||||
|
if req is None:
|
||||||
|
logger.warning(
|
||||||
|
'Could not determine repository location of %s', location
|
||||||
|
)
|
||||||
|
comments.append(
|
||||||
|
'## !! Could not determine repository location'
|
||||||
|
)
|
||||||
|
req = dist.as_requirement()
|
||||||
|
editable = False
|
||||||
|
else:
|
||||||
|
editable = False
|
||||||
|
req = dist.as_requirement()
|
||||||
|
specs = req.specs
|
||||||
|
assert len(specs) == 1 and specs[0][0] in ["==", "==="], \
|
||||||
|
'Expected 1 spec with == or ===; specs = %r; dist = %r' % \
|
||||||
|
(specs, dist)
|
||||||
|
version = specs[0][1]
|
||||||
|
ver_match = cls._rev_re.search(version)
|
||||||
|
date_match = cls._date_re.search(version)
|
||||||
|
if ver_match or date_match:
|
||||||
|
svn_backend = vcs.get_backend('svn')
|
||||||
|
if svn_backend:
|
||||||
|
svn_location = svn_backend().get_location(
|
||||||
|
dist,
|
||||||
|
dependency_links,
|
||||||
|
)
|
||||||
|
if not svn_location:
|
||||||
|
logger.warning(
|
||||||
|
'Warning: cannot find svn location for %s', req)
|
||||||
|
comments.append(
|
||||||
|
'## FIXME: could not find svn URL in dependency_links '
|
||||||
|
'for this package:'
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
comments.append(
|
||||||
|
'# Installing as editable to satisfy requirement %s:' %
|
||||||
|
req
|
||||||
|
)
|
||||||
|
if ver_match:
|
||||||
|
rev = ver_match.group(1)
|
||||||
|
else:
|
||||||
|
rev = '{%s}' % date_match.group(1)
|
||||||
|
editable = True
|
||||||
|
req = '%s@%s#egg=%s' % (
|
||||||
|
svn_location,
|
||||||
|
rev,
|
||||||
|
cls.egg_name(dist)
|
||||||
|
)
|
||||||
|
return cls(dist.project_name, req, editable, comments)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def egg_name(dist):
|
||||||
|
name = dist.egg_name()
|
||||||
|
match = re.search(r'-py\d\.\d$', name)
|
||||||
|
if match:
|
||||||
|
name = name[:match.start()]
|
||||||
|
return name
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
req = self.req
|
||||||
|
if self.editable:
|
||||||
|
req = '-e %s' % req
|
||||||
|
return '\n'.join(list(self.comments) + [str(req)]) + '\n'
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
||||||
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# If we are running from a wheel, add the wheel to sys.path
|
||||||
|
# This allows the usage python pip-*.whl/pip install pip-*.whl
|
||||||
|
if __package__ == '':
|
||||||
|
# __file__ is pip-*.whl/pip/__main__.py
|
||||||
|
# first dirname call strips of '/__main__.py', second strips off '/pip'
|
||||||
|
# Resulting path is the name of the wheel itself
|
||||||
|
# Add that to sys.path so we can import pip
|
||||||
|
path = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
sys.path.insert(0, path)
|
||||||
|
|
||||||
|
import pip # noqa
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(pip.main())
|
||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
Policy
|
||||||
|
======
|
||||||
|
|
||||||
|
Vendored libraries should not be modified except as required to actually
|
||||||
|
successfully vendor them.
|
||||||
|
|
||||||
|
|
||||||
|
Modifications
|
||||||
|
=============
|
||||||
|
|
||||||
|
* html5lib has been modified to import six from pip._vendor
|
||||||
|
* pkg_resources has been modified to import _markerlib from pip._vendor
|
||||||
|
* markerlib has been modified to import its API from pip._vendor
|
||||||
|
* CacheControl has been modified to import it's dependencies from pip._vendor
|
||||||
|
* progress has been modified to not use unicode literals for support for Python 3.2
|
||||||
|
|
||||||
|
|
||||||
|
_markerlib and pkg_resources
|
||||||
|
============================
|
||||||
|
|
||||||
|
_markerlib and pkg_resources has been pulled in from setuptools 18.2
|
||||||
|
|
||||||
|
|
||||||
|
Note to Downstream Distributors
|
||||||
|
===============================
|
||||||
|
|
||||||
|
Libraries are vendored/bundled inside of this directory in order to prevent
|
||||||
|
end users from needing to manually install packages if they accidently remove
|
||||||
|
something that pip depends on.
|
||||||
|
|
||||||
|
All bundled packages exist in the ``pip._vendor`` namespace, and the versions
|
||||||
|
(fetched from PyPI) that we use are located in ``vendor.txt``. If you wish
|
||||||
|
to debundle these you can do so by either deleting everything in
|
||||||
|
``pip/_vendor`` **except** for ``pip/_vendor/__init__.py`` or by running
|
||||||
|
``PIP_NO_VENDOR_FOR_DOWNSTREAM=1 setup.py install``. No other changes should
|
||||||
|
be required as the ``pip/_vendor/__init__.py`` file will alias the "real"
|
||||||
|
names (such as ``import six``) to the bundled names (such as
|
||||||
|
``import pip._vendor.six``) automatically. Alternatively if you delete the
|
||||||
|
entire ``pip._vendor`` you will need to adjust imports that import from those
|
||||||
|
locations.
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
"""
|
||||||
|
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
|
||||||
|
depend on something external.
|
||||||
|
|
||||||
|
Files inside of pip._vendor should be considered immutable and should only be
|
||||||
|
updated to versions from upstream.
|
||||||
|
"""
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import os.path
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Downstream redistributors which have debundled our dependencies should also
|
||||||
|
# patch this value to be true. This will trigger the additional patching
|
||||||
|
# to cause things like "six" to be available as pip.
|
||||||
|
DEBUNDLED = False
|
||||||
|
|
||||||
|
# By default, look in this directory for a bunch of .whl files which we will
|
||||||
|
# add to the beginning of sys.path before attempting to import anything. This
|
||||||
|
# is done to support downstream re-distributors like Debian and Fedora who
|
||||||
|
# wish to create their own Wheels for our dependencies to aid in debundling.
|
||||||
|
WHEEL_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
# Define a small helper function to alias our vendored modules to the real ones
|
||||||
|
# if the vendored ones do not exist. This idea of this was taken from
|
||||||
|
# https://github.com/kennethreitz/requests/pull/2567.
|
||||||
|
def vendored(modulename):
|
||||||
|
vendored_name = "{0}.{1}".format(__name__, modulename)
|
||||||
|
|
||||||
|
try:
|
||||||
|
__import__(vendored_name, globals(), locals(), level=0)
|
||||||
|
except ImportError:
|
||||||
|
__import__(modulename, globals(), locals(), level=0)
|
||||||
|
sys.modules[vendored_name] = sys.modules[modulename]
|
||||||
|
base, head = vendored_name.rsplit(".", 1)
|
||||||
|
setattr(sys.modules[base], head, sys.modules[modulename])
|
||||||
|
|
||||||
|
|
||||||
|
# If we're operating in a debundled setup, then we want to go ahead and trigger
|
||||||
|
# the aliasing of our vendored libraries as well as looking for wheels to add
|
||||||
|
# to our sys.path. This will cause all of this code to be a no-op typically
|
||||||
|
# however downstream redistributors can enable it in a consistent way across
|
||||||
|
# all platforms.
|
||||||
|
if DEBUNDLED:
|
||||||
|
# Actually look inside of WHEEL_DIR to find .whl files and add them to the
|
||||||
|
# front of our sys.path.
|
||||||
|
sys.path[:] = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path
|
||||||
|
|
||||||
|
# Actually alias all of our vendored dependencies.
|
||||||
|
vendored("cachecontrol")
|
||||||
|
vendored("colorama")
|
||||||
|
vendored("distlib")
|
||||||
|
vendored("html5lib")
|
||||||
|
vendored("lockfile")
|
||||||
|
vendored("six")
|
||||||
|
vendored("six.moves")
|
||||||
|
vendored("six.moves.urllib")
|
||||||
|
vendored("packaging")
|
||||||
|
vendored("packaging.version")
|
||||||
|
vendored("packaging.specifiers")
|
||||||
|
vendored("pkg_resources")
|
||||||
|
vendored("progress")
|
||||||
|
vendored("retrying")
|
||||||
|
vendored("requests")
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
try:
|
||||||
|
import ast
|
||||||
|
from pip._vendor._markerlib.markers import default_environment, compile, interpret
|
||||||
|
except ImportError:
|
||||||
|
if 'ast' in globals():
|
||||||
|
raise
|
||||||
|
def default_environment():
|
||||||
|
return {}
|
||||||
|
def compile(marker):
|
||||||
|
def marker_fn(environment=None, override=None):
|
||||||
|
# 'empty markers are True' heuristic won't install extra deps.
|
||||||
|
return not marker.strip()
|
||||||
|
marker_fn.__doc__ = marker
|
||||||
|
return marker_fn
|
||||||
|
def interpret(marker, environment=None, override=None):
|
||||||
|
return compile(marker)()
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""Interpret PEP 345 environment markers.
|
||||||
|
|
||||||
|
EXPR [in|==|!=|not in] EXPR [or|and] ...
|
||||||
|
|
||||||
|
where EXPR belongs to any of those:
|
||||||
|
|
||||||
|
python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
|
||||||
|
python_full_version = sys.version.split()[0]
|
||||||
|
os.name = os.name
|
||||||
|
sys.platform = sys.platform
|
||||||
|
platform.version = platform.version()
|
||||||
|
platform.machine = platform.machine()
|
||||||
|
platform.python_implementation = platform.python_implementation()
|
||||||
|
a free string, like '2.6', or 'win32'
|
||||||
|
"""
|
||||||
|
|
||||||
|
__all__ = ['default_environment', 'compile', 'interpret']
|
||||||
|
|
||||||
|
import ast
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import sys
|
||||||
|
import weakref
|
||||||
|
|
||||||
|
_builtin_compile = compile
|
||||||
|
|
||||||
|
try:
|
||||||
|
from platform import python_implementation
|
||||||
|
except ImportError:
|
||||||
|
if os.name == "java":
|
||||||
|
# Jython 2.5 has ast module, but not platform.python_implementation() function.
|
||||||
|
def python_implementation():
|
||||||
|
return "Jython"
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
# restricted set of variables
|
||||||
|
_VARS = {'sys.platform': sys.platform,
|
||||||
|
'python_version': '%s.%s' % sys.version_info[:2],
|
||||||
|
# FIXME parsing sys.platform is not reliable, but there is no other
|
||||||
|
# way to get e.g. 2.7.2+, and the PEP is defined with sys.version
|
||||||
|
'python_full_version': sys.version.split(' ', 1)[0],
|
||||||
|
'os.name': os.name,
|
||||||
|
'platform.version': platform.version(),
|
||||||
|
'platform.machine': platform.machine(),
|
||||||
|
'platform.python_implementation': python_implementation(),
|
||||||
|
'extra': None # wheel extension
|
||||||
|
}
|
||||||
|
|
||||||
|
for var in list(_VARS.keys()):
|
||||||
|
if '.' in var:
|
||||||
|
_VARS[var.replace('.', '_')] = _VARS[var]
|
||||||
|
|
||||||
|
def default_environment():
|
||||||
|
"""Return copy of default PEP 385 globals dictionary."""
|
||||||
|
return dict(_VARS)
|
||||||
|
|
||||||
|
class ASTWhitelist(ast.NodeTransformer):
|
||||||
|
def __init__(self, statement):
|
||||||
|
self.statement = statement # for error messages
|
||||||
|
|
||||||
|
ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str)
|
||||||
|
# Bool operations
|
||||||
|
ALLOWED += (ast.And, ast.Or)
|
||||||
|
# Comparison operations
|
||||||
|
ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn)
|
||||||
|
|
||||||
|
def visit(self, node):
|
||||||
|
"""Ensure statement only contains allowed nodes."""
|
||||||
|
if not isinstance(node, self.ALLOWED):
|
||||||
|
raise SyntaxError('Not allowed in environment markers.\n%s\n%s' %
|
||||||
|
(self.statement,
|
||||||
|
(' ' * node.col_offset) + '^'))
|
||||||
|
return ast.NodeTransformer.visit(self, node)
|
||||||
|
|
||||||
|
def visit_Attribute(self, node):
|
||||||
|
"""Flatten one level of attribute access."""
|
||||||
|
new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx)
|
||||||
|
return ast.copy_location(new_node, node)
|
||||||
|
|
||||||
|
def parse_marker(marker):
|
||||||
|
tree = ast.parse(marker, mode='eval')
|
||||||
|
new_tree = ASTWhitelist(marker).generic_visit(tree)
|
||||||
|
return new_tree
|
||||||
|
|
||||||
|
def compile_marker(parsed_marker):
|
||||||
|
return _builtin_compile(parsed_marker, '<environment marker>', 'eval',
|
||||||
|
dont_inherit=True)
|
||||||
|
|
||||||
|
_cache = weakref.WeakValueDictionary()
|
||||||
|
|
||||||
|
def compile(marker):
|
||||||
|
"""Return compiled marker as a function accepting an environment dict."""
|
||||||
|
try:
|
||||||
|
return _cache[marker]
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
if not marker.strip():
|
||||||
|
def marker_fn(environment=None, override=None):
|
||||||
|
""""""
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
compiled_marker = compile_marker(parse_marker(marker))
|
||||||
|
def marker_fn(environment=None, override=None):
|
||||||
|
"""override updates environment"""
|
||||||
|
if override is None:
|
||||||
|
override = {}
|
||||||
|
if environment is None:
|
||||||
|
environment = default_environment()
|
||||||
|
environment.update(override)
|
||||||
|
return eval(compiled_marker, environment)
|
||||||
|
marker_fn.__doc__ = marker
|
||||||
|
_cache[marker] = marker_fn
|
||||||
|
return _cache[marker]
|
||||||
|
|
||||||
|
def interpret(marker, environment=None):
|
||||||
|
return compile(marker)(environment)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
"""CacheControl import Interface.
|
||||||
|
|
||||||
|
Make it easy to import from cachecontrol without long namespaces.
|
||||||
|
"""
|
||||||
|
__author__ = 'Eric Larson'
|
||||||
|
__email__ = 'eric@ionrock.org'
|
||||||
|
__version__ = '0.11.5'
|
||||||
|
|
||||||
|
from .wrapper import CacheControl
|
||||||
|
from .adapter import CacheControlAdapter
|
||||||
|
from .controller import CacheController
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user