Skip to content
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__ directory included in source tarball #586

Closed
mjpieters opened this issue Oct 6, 2018 · 2 comments
Closed

__pycache__ directory included in source tarball #586

mjpieters opened this issue Oct 6, 2018 · 2 comments

Comments

@mjpieters
Copy link

@mjpieters mjpieters commented Oct 6, 2018

The 1.2.0 release up on PyPI contains python bytecode in the source tarball:

$ mkdir /tmp/invoke-dl/ && cd /tmp/invoke-dl
$ wget https://files.pythonhosted.org/packages/ef/80/cef14194e2dd62582cc0a4f5f2db78fb00de3ba5d1bc0e50897b398ea984/invoke-1.2.0.tar.gz
$ tar xzf invoke-1.2.0.tar.gz
$ find invoke-1.2.0 -name \*.pyc
invoke-1.2.0/invoke/completion/__pycache__/complete.cpython-36.pyc
invoke-1.2.0/invoke/completion/__pycache__/__init__.cpython-36.pyc

These are, transitively, included in the wheel files too.

Please make sure to not include __pycache__ directories in the source tarball. I suspect that it ends up in the source tarball due to the following line in MANIFEST.in:

recursive-include invoke/completion *

😞

I suspect that all it takes is to add

recursive-exclude * __pycache__
recursive-exclude * *.py[co]

to MANIFEST.in to prevent this.

florisla pushed a commit to florisla/invoke that referenced this issue Dec 27, 2018
florisla pushed a commit to florisla/invoke that referenced this issue Jan 20, 2020
@bitprophet
Copy link
Member

@bitprophet bitprophet commented Jan 29, 2020

Grumpy that I missed this when it was first posted. Will try to get this fixed for the upcoming bugfix releases.

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Jan 29, 2020

Huh, well this may explain it, I can't actually reproduce this on my end (macOS 10.14, Python 3.7). E.g. on master today:

» python setup.py sdist
...
» tar tzvf dist/invoke-1.4.0.tar.gz | egrep -v '(\.(py|ya?ml|json|rst|txt|cfg|css)|/)$'               
-rw-r--r--  0 jforcier staff    1314 Jan 24 15:30 invoke-1.4.0/LICENSE                                
-rw-r--r--  0 jforcier staff     273 Jan 10 11:34 invoke-1.4.0/MANIFEST.in                            
-rw-r--r--  0 jforcier staff    2078 Jan 29 12:07 invoke-1.4.0/PKG-INFO                               
-rw-r--r--  0 jforcier staff    1356 Jan 10 11:34 invoke-1.4.0/invoke/completion/bash.completion      
-rw-r--r--  0 jforcier staff     382 Jan 10 11:34 invoke-1.4.0/invoke/completion/fish.completion      
-rw-r--r--  0 jforcier staff    1429 Jan 10 11:34 invoke-1.4.0/invoke/completion/zsh.completion       
-rw-r--r--  0 jforcier staff    2078 Jan 29 12:07 invoke-1.4.0/invoke.egg-info/PKG-INFO               
-rw-r--r--  0 jforcier staff       0 Feb  4  2017 invoke-1.4.0/tests/_support/ignoreme/ignoremetoo/.no

No pyc's, no pycache's. Our MANIFEST.in still doesn't strip them out though (per #604) so I'm wondering what in my process could have added such things earlier, if it's not doing so now. EDIT: actually, I do have pycache folders locally, though they happen to all be empty save for one in tests - which the old MANIFEST would have stripped the pyc out of. Weird.

At any rate, I'll still merge #604 and that should ensure this doesn't recur. Should go out as Invoke 1.3.1 and 1.4.1. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants