[Numpy-discussion] specifying numpy as dependency in your project, install_requires

Ralf Gommers ralf.gommers@gmail....
Sat Oct 6 09:14:14 CDT 2012


On Sun, Sep 23, 2012 at 10:20 PM, Nathaniel Smith <njs@pobox.com> wrote:

> On Sat, Sep 22, 2012 at 1:18 PM, Ralf Gommers <ralf.gommers@gmail.com>
> wrote:
> > On Fri, Sep 21, 2012 at 11:39 PM, Nathaniel Smith <njs@pobox.com> wrote:
> >> So the question is, how do we get a .egg-info? For the specific case
> >> Ralf ran into, I'm pretty sure the solution is just that if you're
> >> clever enough to do an in-place build and add it to your PYTHONPATH,
> >> you should be clever enough to also run 'python setupegg.py egg_info'
> >> which will create a .egg-info to go with your in-place build and
> >> everything will be fine.
> >
> > That command first starts rebuilding numpy.
>
> No, it just seems to run the config and source-generation bits, not
> build anything. It also leaves the .egg-info in the source directory,
> which is what you want.
>

You're right, sorry. I saw output like "building extension
"numpy.core._dotblas" sources" scrolling by and hit Ctrl-C.

>
>
> >> P.S.: yeah the thing where pip decides to upgrade the world is REALLY
> >> OBNOXIOUS. It also appears to be on the list to be fixed in the next
> >> release or the next release+1, so I guess there's hope?:
> >> https://github.com/pypa/pip/pull/571
> >
> > Good to know. Let's hope that does make it in. Given it's development
> model,
> > I'm less optimistic that easy_install will receive the same fix though
> ....
>
> Yeah, easy_install is abandoned and bit-rotting, which is why people
> usually recommend pip :-). But in this case, I thought that
> easy_install already doesn't upgrade the world when it runs? Is there
> something to fix here?
>

It does, as Josef said above. It has the same -U and --no-deps flags.


> > Until both pip and easy_install are fixed, this alone should be enough
> for
> > the advice to be "don't use install_requires". It's not like my
> alternative
> > suggestion takes away any information or valuable functionality.
>
> pandas, for example, requires several other packages, and I found it
> quite convenient the other day when I wanted to try out a new version
> and pip automatically took care of setting all that up for me. It even
> correctly upgraded numpy, since the virtualenv I was using for testing
> had inherited my system-installed 1.5.2, but this was the first
> version of pandas that needed 1.6.
>

So this saved you from reading "pandas requires numpy >= 1.6.1" and typing
"pip install -U numpy". Not my definition of valuable functionality, and
certainly not worth the risk of upgrading numpy silently for users.

Python packaging tools make me feel grumpy and traumatized too but I
> don't see how the solution is to just give up on computer-readable
> dependency-tracking altogether.
>

Proper dependency tracking would be preferable, but none at all is better
than the current situation imho.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20121006/a6547672/attachment-0001.html 


More information about the NumPy-Discussion mailing list