Repository navigation
Change in behavior in setuptools 0.6c11 is causing issues on certain setups - #396
Conversation
|
It looks like others have had this issue: pandas-dev/pandas#1806 |
|
Suggested patch in setuptools, though seems to have fallen on deaf ears? http://mail.python.org/pipermail/distutils-sig/2012-June/018647.html |
|
Use distribute. |
|
@astrofrog, was the |
|
It's vanilla Also, to test this out, I had to put this in my dependencies file for pip so the print statements are in one of my branches. Exploring this more, the issue is occurring when using virtualenv, without the However, I think this wasn't an issue with older versions of setuptools - as indicated in the link for pandas in one of my above comments, this is a change that has also affected other projects. I feel like something has to be done at some level, because there is a change in behavior that is messing things up. Any ideas on how we should proceed? |
|
Actually, I don't fully understand how this is "new"/changed behavior. Isn't 0.6c11 pretty old? If I look at http://pypi.python.org/pypi/setuptools/0.6c11, it seems to say this was most recently updated in 2009, so it should be the "standard" setuptools? Anyway, though, the point of using distribute is to get around the fact that setuptools is no longer updated (and not py 3.x compatible, anyway). So while we could do a workaround like that pandas fix (maybe? Our scheme is slightly different and I haven't thought about it terribly closely), I'm not sure we want to. A better fix might be to figure out why distribute is not being used. |
|
It seems that when installing with pip, if distribute cannot be found, setuptools is used. This is an extract from the installation log with (and use_2to3 is a distribute thing) so this shows that vanilla setuptools is being used. Curiously, if distribute is present, albeit a version older than 0.6.28 (which is what (which, incidentally, was a good reason to not update |
|
Interesting, so in the case of a virtualenv set up with setuptools, |
|
This is definitely a pip vs non-pip issue. When using pip, after if I do it points to the vanilla setuptools. If not using pip, it points to the distribute setuptools. |
|
I've summarized the issue on stackoverflow: http://stackoverflow.com/questions/12572759/issue-with-pip-distribute-and-setuptools where I hope someone will have some insight... |
|
I'll need to spend some time catching up on this later, but in sort if you already have setuptools installed then distribute isn't used (because the |
|
Scratch what I just said--I forgot that we do call into |
|
The call signature for so I don't see anything that would help us here... It does look like |
|
@iguananaut - I have a suggestion for fixing this in Astropy without hacking too much. We could change: to which seems to do the trick. Any thoughts on this? |
|
By the way, the simplest way to reproduce the issue and test the fix above is to install setuptools 0.6c11 and comment out |
|
@astrofrog - unless I'm misunderstanding, your suggestion appears to be a change from the original behavior. In the current master, if you are in development mode and have cython, it will always use the I altered your idea to fix this, and it seems to work: I've placed a branch with this at https://github.com/eteq/astropy/tree/setuptools0.6c11-fix - shall I attach it to this issue? |
|
Seems fine, though I don't fully understand the issue. I don't usually have setuptools installed anymore except in a few venvs for testing. |
|
Looks like stackoverflow doesn't understand the issue either ;-) The bottom line is just that setuptools will automatically convert .pyx filenames to .c if pyrex is not available, even if cython is available... I think @eteq's fix will work, but I will double check tomorrow (I am traveling right now). EDIT: and of course, the real issue is that pip somehow causes vanilla setuptools to load. |
|
maybe we should leave an issue at https://github.com/pypa/pip/issues (in addition to our internal workaround)? I don't see exactly this, although I only glanced over the (rather lengthy) list... |
|
@eteq - regarding your previous comment, please feel free to attach your suggested fix to this issue, and I'll check it thoroughly tomorrow. |
|
Code is attached (oh, and ignore the travis build status warning - that's because it's on for my fork and off for the main astropy repo) |
based on @astrofrog's suggestion in astropy#396
|
I tested this and it works properly with pip now - merging! |
Change in behavior in setuptools 0.6c11 is causing issues on certain setups
based on @astrofrog's suggestion in astropy#396
Change in behavior in setuptools 0.6c11 is causing issues on certain setups
Fix coverage reporting
Added Simon Conseil to infrastructure roles
It looks like setuptools recently changed their behavior. For the following code:
the output was
with 0.6, and
with 0.6c11. Now the Astropy code doesn't use
but
However, I haven't wrapped my head around distribute/distutils/setuptools/etc. but it looks like on one setup I was using (pip), if I did
print(extension)in Astropy it gaveTo reproduce this issue, update setuptools to 0.6c11, then create a file
dependenciescontaining:then do:
and you should get something like:
All right, I'm done reporting this issue :-) Any ideas?
cc @iguananaut @mdboom @eteq