About Custom Zipping

To archive a Python module on macOS excluding OS-specific files and Python bytecode, you can use the zip command in the Terminal:

1
2
$ zip -r my_python_module.zip my_python_module \
-x "*.DS_Store" -x "*.pyc" -x "__pycache__"

Why would you need that? Maybe for some quick sharing with a friend?

Tips and Tricks Dev Ops Bash Zsh