10 ms·
Check out devpi (http://doc.devpi.net/latest/ http://doc.devpi.net/latest/). We build our projects as wheels with pip using devpi as a custom index, i.e.: BUIL
by ermintrude 12y ago
Check out devpi (http://doc.devpi.net/latest/ http://doc.devpi.net/latest/). We build our projects as wheels with pip using devpi as a custom index, i.e.:
BUILD_DIR="/tmp/wheelhouse/$PROJECT"
pip wheel --wheel-dir=$BUILD_DIR --find-links=$BUILD_DIR --index=http://$DEVPI_HOST:$DEVPI_PORT/${DEVPI_USER}/${DEVPI_INDEX} http://$DEVPI_HOST:$DEVPI_PORT/${DEVPI_USER}/${DEVPI_INDEX} --extra-index-url=https://pypi.python.org/simple/ https://pypi.python.org/simple/ ../$PROJECT
This will try to get packages from your devpi index, but will fall back to pypi if you don't have them.
Then upload this to devpi. It can later be installed by pip with:
pip install --use-wheel --index=http://$DEVPI_HOST:$DEVPI_PORT/${DEVPI_USER}/${DEVPI_INDEX} http://$DEVPI_HOST:$DEVPI_PORT/${DEVPI_USER}/${DEVPI_INDEX} $PROJECT
This makes deployments super fast because you're deploying pre-built wheels instead of downloading and compiling from pypi. It also gives you resiliance by storing copies of the dependencies you need in devpi, so if they vanish from pypi (or it's unavailable) you can still deploy your software with all the dependencies you developed against.