Can I remove python source files (*.py) after byte-compiling? I know this does not provide a security and that .pyc/o files can be reverse-engineered very easily; I just want to release less files on a release.
# Clean the python cache
find ./mypythonstuffs -type f -name "*.py[co]" -delete
find ./mypythonstuffs -type d -name "__pycache__" -delete
# Remove test directories
find ./mypythonstuffs -name "test" -type d -exec rm -r "{}" \;
# Byte-compile, ignoring .git subdirectories
python3 -O -m compileall -f -x r'[/\\][.]git' ./mypythonstuffs
# Remove now-unnecessary??? python source files
find ./mypythonstuffs -type f -name "*.py" -delete
.gitignore? Seems like a lot of work to avoid something that should be trivially easy to leave out of your releases.