-
Notifications
You must be signed in to change notification settings - Fork 3.1k
(pypy/debian only) setuptools broken during an upgrade #1632
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
Comments
|
This started impacting systems on our remaining provider over the weekend, and seems coincidentally timed to the release of setuptools 3.3 (no idea whether that could be related to the new shift in behavior). |
/cc @jaraco |
It sounds like the issue is related to something about how the setuptools package is updated during the installation process. It sounds as if the issue is not related to a specific setuptools version, but rather the way in which the version changes. I would not be surprised if this issue is related to the way the 'sandbox' is created during builds, though I really don't have any insight to add yet. I can say that it seems unlikely that the recent changes would have affected the way builds are done with respect to that command line argument. |
here's the story: when pip installs from wheel, it runs pip uses the so right now, pip/pypy uninstalls of any wheels, are leaving empty shells of old metadata around, which sets up a failure scenario later due to metadata mismatches. so back to the setuptools case: for me, it's not just failing with: `pip install -U setuptools mccabe' but also much worse, like this:
pip's internal use of setuptools fails with the duplicate metadata. if you remove the old metadata dir, everything is ok. so, what's the fix? the RECORD file needs to have an entry for the dist-info and this looks worthy of a patch release. |
I don't see that. breaks for 3.1 too. |
Maybe I'm being dense but isn't this a bug in pypy? Why is it creating a I'm not saying we don't need to work around it, but it's worth a pypy bug report too. |
AFAIK the issue that is *debian pypy is running a Python 2 implementation, yet I'm guessing they just never guessed that importing |
I'm not sure the fact that it's a |
PyPy (version 2.7.x) doesn't contain any line of code with |
More precisely, |
Yes, it seems debian (and the PPA) include a set of patches which do cause On Wed, Mar 19, 2014 at 7:40 AM, arigo [email protected] wrote:
"I disapprove of what you say, but I will defend to the death your right to |
Here's an upstream bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742132 Probably we should work around this in pip too. It seems like we shouldn't fail because of an empty directory that we installed, even if it was created erroneously. |
It's probably reasonable not to worry about changing RECORD, because we don't typically put directory names in there as far as I can see. Instead, let's just delete How about, if we delete files from a directory, then when we're done if the directory contains nothing but a |
Well the question is, if someone has an empty directory in their dist-info already what will we do? I think ATM we'll install it and then fail in the same way that this fails. IOW this failure isn't specific to |
We've got to the point where I should look at the code before guessing, but I think that we don't currently record directories in |
Actually, what's probably a better solution is to make it so we only deal with files. Right now we have this sort of bad state where when installing we'll happily install directories, but uninstall we only uninstall files. My assertion is that if we install something, then we should also uninstall it. So I would say ideally we should only install files (creating any directories we need to) and we should only uninstall directories (removing any directories that we make empty, or empty sans .pyc and This should solve the problem that is the cause of this ticket, and make things work in a much saner fashion. |
debian hacks the |
for history's sake, here's the pypy thread from 2012, when it was discovered that the debian distro of pypy adds the debian maintainer chimes in after a few posts. |
Thanks so much for fixing this @qwcode -- can this issue be closed? |
yes, closing |
On some systems, and so far I've been unable to determine what makes them "special" in this way, upgrading setuptools with pip at the same time as upgrading particular other packages causes their setup.py invocation to fail with "error: option --single-version-externally-managed not recognized". Upgrading them independently of setuptools (either before or after) does not exhibit this behavior.
I saw it briefly weeks ago, but the release of setuptools 2.2 seemed to cause it to cease. The most recent occurrences seem to possibly coincide with Saturday's release of setuptools 3.1, but that could simply be a red herring.
I have narrowed it down to a simple means of recreating this on the affected systems where we're seeing it currently: within a pypy virtualenv, use pip to upgrade setuptools and mccabe together on the same command line. Examples...
Working consistently on Ubuntu 12.04 VMs in one service provider: http://paste.openstack.org/show/73058/
Failing consistently on seemingly-identical Ubuntu 12.04 VMs in another service provider: http://paste.openstack.org/show/73060/
I discussed this with Alex Gaynor just now, and we agree that this feels like some sort of strangeness in pip which is getting triggered by hash ordering differences in different systems/interpreters rather than being a PyPy-specific bug. On the systems where this fails in a pypy virtualenv, it succeeds normally in a python2.7 or python3.3 virtualenv.
The text was updated successfully, but these errors were encountered: