mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
ee93719b79
Create a common download_python() function that allows most other files in the build/runtimes directory to be simplified to something of the form: ``` #!/usr/bin/env bash # Build Path: /app/.heroku/python/ # Build Deps: libraries/sqlite OUT_PREFIX=$1 source ./download_python download_python "2.7.8" cd src ./configure --prefix=$OUT_PREFIX make make install ```
21 lines
496 B
Bash
21 lines
496 B
Bash
#!/usr/bin/env bash
|
|
# Build Path: /app/.heroku/python/
|
|
# Build Deps: libraries/sqlite
|
|
|
|
# download_python(PYTHON_VERSION)
|
|
# Example usage: download_python "2.7.8"
|
|
download_python()
|
|
{
|
|
PYTHON_VERSION=$1
|
|
|
|
if [ -z $PYTHON_VERSION ]
|
|
then
|
|
$PYTHON_VERSION="2.7.8"
|
|
fi
|
|
|
|
echo "Building Python $PYTHON_VERSION..."
|
|
SOURCE_TARBALL="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz"
|
|
curl -L $SOURCE_TARBALL | tar xz
|
|
mv Python-$PYTHON_VERSION src
|
|
}
|