What's the correct way to exclude files from a python wheel distribution package?
Editing the MANIFEST.in
does not have any effect and I can't find information about this detail.
__pycache__/ . The ending slash indicates it is a directory and will ignore any files beneath it. You don't need ** . You can just say __pycache__/ .
__pycache__ is a folder containing Python 3 bytecode compiled and ready to be executed. I don't recommend routinely laboriously deleting these files or suppressing creation during development as it wastes your time.
Python stores the compiled bytecode in __pycache__ directory so that future imports can use it directly, rather than having to parse and compile the source again. It does not do that for merely running a script, only when a file is imported. (Previous versions used to store the cached bytecode as .
Python-What is __pycache__? At the point when you run a program in python, the interpreter compiles it to bytecode first and stores it in the __pycache__ folder. If you go through there you will find a lot of files sharing the names of the . py files in your project's folder, just their extensions will be either .
Why would you be doing that? The __pycache__ directory will be generated anyway when a project is run for the first time on the target machine. It's simply an optimised bytecode representation of Python.
But anyway, you can write an script that unpacks the .whl file and does the modifications and then repacks the wheel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With