#!/bin/bash # Script to install binarycpython in the current venv VERSION_NUMBER=$(cat "VERSION") echo "installing binarcpython version $VERSION_NUMBER" # check the BINARY_C environment variable is defined if [[ -z "${BINARY_C}" ]]; then echo "Error: The BINARY_C environment variable is not defined. This should point to the directory of your binary_c installation. Please set it and try again." exit fi # we can only use python3 and python3, but allow # the user to set these in environment variables # PYTHON and PIP. : "${PYTHON:="python3"}" : "${PIP:="pip3"}" # do stuff... $PYTHON setup.py clean $PIP uninstall -y binarycpython $PYTHON setup.py build --force $PYTHON setup.py sdist $PIP install -v dist/binarycpython-$VERSION_NUMBER.tar.gz