-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Updating MANIFEST.in does not correctly update the package sdist creates #436
Comments
I have been hit by this same bug. My current remedy is to delete the |
The problema appears to be in the logic with which the
Files already in |
See also setuptools/setuptools/command/egg_info.py Lines 560 to 570 in d4c215a
where the actual reading of SOURCES.txt takes place: rcfiles = list(walk_revctrl())
if rcfiles:
self.filelist.extend(rcfiles)
elif os.path.exists(self.manifest):
self.read_manifest() I cannot understand the reason for this logic. |
@jaraco I think I nailed down this old (annoying bug), but nobody cares of these old bugs. Should I reopen or provide a pull request? |
@miccoli: If this ticket describes the issue, it's still open. A PR would be most appreciated. |
@jaraco yes: this ticket is accurate. Since there is no discussion active, I assume that I should provide my own PR. |
addresses #436: Updating MANIFEST.in does not correctly update the package sdist creates
I think this change may have broken sdist installs with package data: #1016 |
The reason for rcfiles = list(walk_revctrl())
if rcfiles:
self.filelist.extend(rcfiles)
elif os.path.exists(self.manifest):
self.read_manifest() is now clear: in the develop tree (under SCM control) the files to be installed are determined from the SCM system ( This logic is broken for packages that do not use Unfortunately my PR #1014 badly brokes this intended behaviour, so that |
…pdate the package sdist creates"
Is there a fix to this now? Even if I delete |
@Firenze11 unfortunately my previous attempt at solving this bug (PR #1014) was catastrophic. (I'm still a little ashamed of the mess I made.) But from my analysis the only place where previous content of Can you please provide an example in which |
I really think SOURCES.txt should be cleared automatically at some point. This is very surprising behavior. I've been trying to figure out why the changes I was making to MANIFEST.in didn't seem to be working. |
setuptools has a long-standing bug that if files are removed from the list of sources but were included in a previous run of egg_info, they remain in the generated list of sources (pypa/setuptools#436). This affects egg_info and sdist. Let's work around this by removing the old SOURCES.txt if we can recreate it from git.
setuptools has a long-standing bug that if files are removed from the list of sources but were included in a previous run of egg_info, they remain in the generated list of sources (pypa/setuptools#436). This affects egg_info and sdist. Let's work around this by removing the old SOURCES.txt if we can recreate it from git.
setuptools has a long-standing bug that if files are removed from the list of sources but were included in a previous run of egg_info, they remain in the generated list of sources (pypa/setuptools#436). This affects egg_info and sdist. Let's work around this by removing the old SOURCES.txt if we can recreate it from git.
Hi I am running into the same issue, but I haven't quite figured out @miccoli @rsyring could you help me with a bit more explanations? I don't have a MANIFEST.in file and I am not quite sure what steps I should follow to have Thanks a lot for the help! |
@lucacerone This issue is specific to a setup with The only thing that you should be aware, regarding this specific bug, is that after each change to |
Thanks a lot @miccoli, I managed to get the "data" in my package by adding a I don't quite understand what happens to "data" that resides outside of the "package" folder (I know it's not the preferred way, and in the end I moved the folder within the package), because if I add it to the Manifest.in, in the resulting archive I see those folders, but then they don't get copied to the I think the documentation could be a bit more clear on what's going on under the hood, but in the end I found a way that works for me :) Many thanks for your answer, I really appreciated it! |
For me this
from @miccoli works fine 😉. |
So annoying this bug... I tried to delete the .egg-info directory as @miccoli suggested but I can not update the files included in my python package by updating the MANIFEST.in. Even if I delete the whole MANIFEST.in file, when I rerun "$ python setup.py sdist" the SOURCE.txt include all the old files I included in the MANIFEST.in. Is not there any fix for this bug yet? |
@MangelFdz do you have a reproduction? This does not seem to be quite the same problem described previously in this issue (for that problem things should work when you remove the |
I have this issue. I have fallen back to just adding back in empty directories corresponding to those that were once in the MANIFEST.in Not a great solution, but moving on I guess. |
I can confirm that deleting the |
Thx! That really solved the problem. |
I can confirm the issue still exists, even when building using the PEP 517 builder:
I don't know why I thought that I think what I'd like to see is for setuptools not to write an .egg-info at all when doing a build. I know it's unnecessary in general (not required by the specs or created by other backends). I wonder if there are any setuptools-specific behaviors that depend on that egg-info directory (in the working directory or the sdist). |
Originally reported by: spookylukey (Bitbucket: spookylukey, GitHub: spookylukey)
The behaviour of sdist depends on previous contents of MANIFEST.in, not just the current. This is not fixed even by running
setup.py clean
orsetup.py clean --all
(although this should not be necessary).This is very surprising behaviour, and potentially dangerous too - if someone accidentally adds a MANIFEST.in rule that includes a file that must not be distributed and notice the problem, they would expect that removing the rule will remove the file, but it does not.
I've attached a bash script that demonstrates the problem.
The text was updated successfully, but these errors were encountered: