Skip to content

Instantly share code, notes, and snippets.

@datashaman
Created December 15, 2017 09:46
Show Gist options
  • Select an option

  • Save datashaman/5fc6bfdee33757ce32600b44e99c35c3 to your computer and use it in GitHub Desktop.

Select an option

Save datashaman/5fc6bfdee33757ce32600b44e99c35c3 to your computer and use it in GitHub Desktop.
build and deploy from a wheel archive
#!/usr/bin/env bash
tempdir=$(mktemp -d /tmp/wheel-XXXXX)
pip wheel -r requirements.txt --wheel-dir=$tempdir
BUILD_HOME=${BUILD_HOME:-$(pwd)/build}
BUILD_FILE=${BUILD_FILE:-build}
mkdir -p "$BUILD_HOME"
(cd "$tempdir"; tar -czvf "$BUILD_HOME/$BUILD_FILE.tgz" *)
#!/usr/bin/env bash
tempdir=$(mktemp -d /tmp/wheel-XXXXX)
BUILD_HOME=${BUILD_HOME:-$(pwd)/build}
BUILD_FILE=${BUILD_FILE:-build}
(cd $tempdir; tar -xvf "$BUILD_HOME/$BUILD_FILE.tgz")
pip install --force-reinstall --ignore-installed --upgrade --no-index --no-deps $tempdir/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment