Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

python runtime support, fixes #8 #13

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
cat <<EOF
---
config_vars:
PATH: /app/.heroku/anaconda/bin:/usr/local/bin:/usr/bin:/bin
PATH: /app/.heroku/anaconda/bin:/app/.heroku/miniconda/bin:/usr/local/bin:/usr/bin:/bin
EOF
24 changes: 20 additions & 4 deletions bin/steps/conda_compile
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
# determine Python version
DEFAULT_PYTHON_VERSION="python-2.7.9"
# If no runtime given, assume default version.
if [ ! -f runtime.txt ]; then
echo $DEFAULT_PYTHON_VERSION > runtime.txt
fi
PYTHON_VERSION=$(cat runtime.txt)
# split on '-' and take just the number
PYTHON_VERSION_NUMBER=`echo $PYTHON_VERSION | cut -d \- -f 2`

if [ ! -d /app/.heroku/miniconda ]; then
puts-step "Preparing Python/Miniconda Environment (3.5.2)"
curl -Os http://repo.continuum.io/miniconda/Miniconda-3.7.3-Linux-x86_64.sh
bash Miniconda-3.7.3-Linux-x86_64.sh -p /app/.heroku/miniconda/ -b | indent
rm -fr Miniconda-3.7.3-Linux-x86_64.sh
puts-step "Preparing Python/Miniconda Environment"
curl -Os http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
bash Miniconda-latest-Linux-x86_64.sh -p /app/.heroku/miniconda/ -b | indent
rm -fr Miniconda-latest-Linux-x86_64.sh

# maybe check for updates - condaenv must be deactivated
# conda update --yes conda
conda create -n condaenv --yes python=$PYTHON_VERSION_NUMBER
source activate condaenv

conda install pip --yes | indent
fi


if [ -f conda-requirements.txt ]; then
puts-step "Installing dependencies using Conda"
source activate condaenv
conda install --file conda-requirements.txt --yes | indent
fi

Expand Down