Skip to content
Snippets Groups Projects
Commit ee93719b authored by cclauss's avatar cclauss
Browse files

Add download_python function to reduce repetition

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
```
parent 361eb532
No related branches found
No related tags found
No related merge requests found
#!/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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment