Skip to content

Instantly share code, notes, and snippets.

@stigtsp
Created October 31, 2018 13:09
Show Gist options
  • Select an option

  • Save stigtsp/06e855e1b228d5eeae6b8e7827deef4f to your computer and use it in GitHub Desktop.

Select an option

Save stigtsp/06e855e1b228d5eeae6b8e7827deef4f to your computer and use it in GitHub Desktop.
pyz:
rm -f build.pyz
rm -rf build
mkdir build
cp -R src/* build
find build -type f -name '*.pyc' -delete
find build -newermt '2018-01-01' -print0 | xargs -0r touch --no-dereference --date='2018-01-01'
python2.6 -m compileall build
find build -type f -name '*.py' -delete
# rm build/__main__.pyc
# cp -v src/__main__.py build/__main__.py
find build -newermt '2018-01-01' -print0 | xargs -0r touch --no-dereference --date='2018-01-01'
cd build && zip -oXr ../build.pyz *
sha256sum build.pyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment