I need to send a compiled version of a python script and be able to prove (using a hash) that the compiled file really matches the source.
What we use so far is simple:
find . -name "*.py" -print0 | xargs -0 python2 -m py_compile
The problem is that it is not reproducible (not sure which vibrational factors, but 2 executions do not give us the same .pyc for the same python file) and forces us to always send the same compiled version instead of Being able to just give the build script to someone to create a new compiled version.
Is there any way to achieve this?
thanks
source share