Created
May 19, 2019 18:28
-
-
Save bq1990/f71eebca84c279f84c33bdb315be2333 to your computer and use it in GitHub Desktop.
Bundle Python requirements in zip file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pip install -r requirements.txt --target ./packages | |
if [ -d packages ]; then | |
cd packages | |
find . -name "*.pyc" -delete | |
find . -name "*.egg-info" | xargs rm -rf | |
zip -9mrv packages.zip . | |
mv packages.zip .. | |
cd .. | |
rm -rf packages | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment