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

Stale *.egg-info/SOURCES.txt can hide problems with MANIFEST.in #1

Closed
regebro opened this issue Mar 6, 2013 · 8 comments
Closed

Stale *.egg-info/SOURCES.txt can hide problems with MANIFEST.in #1

regebro opened this issue Mar 6, 2013 · 8 comments

Comments

@regebro
Copy link

regebro commented Mar 6, 2013

Well, check-manifest did take a lot of pain out of making MANIFEST.in files. Thanks!

However, one pain is still there. I've noticed that when changing MANIFEST.in it doesn't make any difference unless I make sure the .egg-info is updated. I assume it's the SOURCES.txt that is the culprit.

I'm not sure where the bug is that causes that, but check-release doesn't change it. I'd suggest that check-release verifies that if there is a .egg-info/SOURCES.txt is also runs setup.py egg_info to rebuild it , at least if it's timestamp is before the timestamp of MANIFEST.in.

@mauritsvanrees
Copy link
Contributor

Running sdist, like check-manifest does, should already run egg_info automatically. I get this output when I try it manually, also at a second run:

$ python2.7 setup.py sdist
running sdist
running egg_info
writing requirements to Products.Poi.egg-info/requires.txt
...

Which python version are you using?

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

Please tell me how I can reproduce the issue, and I'll do my best to fix it.

As Maurits already said, python setup.py sdist should do everything necessary already.

@regebro
Copy link
Author

regebro commented Mar 6, 2013

You are right, just running egg_info doesn't help, I have to actually delete SOURCES.txt to trigger the update.

The problem is that egg_info will read SOURCES.txt and then MANIFEST.in and merge them, meaning that removing something from MANIFEST.in will not update SOURCES.txt unless you first delete SOURCES.txt.

For example, pyroma has a graft pyroma/testdata/distributions line. If I comment that out and re-run egg_info, those files stay. If I then delete SOURCES.txt and re-run egg_info, they are gone. It's extremely annoying.

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

Yes, I've been bitten by this behavior of setuptools before.

I've a plan to detect this:

  • export the sources from VCS into a temporary directory
  • run setup.py sdist in there

This will solve your problem (not noticing that a MANIFEST.in is incomplete because the required files are still included thanks to a stale *.egg-info/SOURCES.txt) and some other problems too (not noticing that a MANIFEST.in is incomplete because you've got setuptools-git installed).

I was procrastinating on this because

  • I don't want to write separate functions that deal with all supported version control systems (svn export, git archive --format=tar | tar xf -, whatever the spellings for hg and bzr are)
  • it would break in the presence of locally modified files (such as MANIFEST.in) that haven't been committed yet

and now suddenly I have come up with the perfect solution:

  • don't use VCS-specific export calls, just copy the files by hand -- check-manifest already has the full list!

Thanks for the inspiration!

@regebro
Copy link
Author

regebro commented Mar 6, 2013

Right, a checkout/export would also not solve this if you check in .egg-info in the VCS (yes, I've seen this done several times). So that seems like the right way to go. Thanks!

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

I've no words to describe the feeling I got when you told me people actually commit .egg-info into the VCS.

I'll add an explicit check for that.

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

This if fixed in master. I'll release 0.9 later today.

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

0.9 is out.

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

No branches or pull requests

3 participants