-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__pycache__ in the wheel #120
Comments
Not really; it's probably because of this function which includes all directories under |
It seems that function is not responsible, it doesn't seem to change the wheel. If you have a |
This function is responsible. Via
The easiest workaround is to replace: for parent, dirs, files in os.walk(test_dir):
- if files:
+ if files and os.path.basename(parent) != '__pycache__':
test_files.append(pjoin(parent[prefix_len:], '*.*')) as a first step. Alternatively, make sure to build the wheel on a clean repository (e.g. However, I think the real issue is that wildcard inclusion is pretty dangerous and probably not the best idea in general. Instead, one should list explicitly what kinds of files should be in the archive. For example set
Note: Make sure to remove your |
In the wheel on PyPI there are the following directories:
Should they be there?
I noticed this because we only deploy
.pyc
files so after the pip install I pull the.pyc
files out of__pycache__
and into the location of the.py
files using this script.https://bitbucket.org/Siecje/restore_pyc/src/9834a5c2c16acf29b5b330ebd7590585bc20126b/restore_pyc.py?at=default&fileviewer=file-view-default
I noticed that the resulting
.pyc
had a different magic code. There is likely a bug in therestore_pyc.py
script linked above as it should be finding the.pyc
file that was created during the pip install.But I figured I would report that there are
__pycache__
directories in the wheel.The text was updated successfully, but these errors were encountered: