[Distutils] setup_requires and install_requires

Toby St Clere Smithe mail at tsmithe.net
Sun May 25 11:15:40 CEST 2014


Hi Nick,

Nick Coghlan <ncoghlan at gmail.com> writes:
> Could you let us know what your path was in looking? I thought the trail
> from docs.python.org -> packaging.python.org -> the Projects page -> the
> respective GitHub/BitBucket pages was reasonably clear now (with the length
> being inherent in the complexity of the problem), but the current
> arrangements are all still relatively new, so it also doesn't surprise me
> there are still discoverability problems.

Well, I was unable to get from the first to the second step, but I
suspect I was searching for a bug tracker related to distutils (because
this group is named for distutils). When I found a setuptools tracker, I
found [1], which didn't seem quite right -- and now I've found the
setuptools documentation (which seems to be on pythonhosted.org, not
docs.python.org, the latter of which only seems to have distutils, and
does not link as far as I can see to the setuptools tracker), I wonder
why the bug tracker (or this list) is only linked from [2] and not from
the higher-level [3]; [2] isn't a particularly discoverable place.

Also, the link from [2] to the tracker only takes you to [4], not to
[5], which I would expect. That I was sent to [4] made me think that I
had been sent to the wrong place, until I found the small paragraph at
the bottom of the page.  Note that [1] is top of a Google search (for
me) for "setuptools bug".

Finally, I'm glad to see that a setup_requires / install_requires bug
has been opened[6], though Marc's 'observation' isn't quite the same as
my observation; I'm not sure that's really important, as long as 'they
don't place nicely together' is recorded.

[1] http://bugs.python.org/setuptools/
[2] https://pythonhosted.org/setuptools/setuptools.html
[3] https://pythonhosted.org/setuptools/
[4] https://bitbucket.org/pypa/setuptools/
[5] https://bitbucket.org/pypa/setuptools/issues
[6] https://bitbucket.org/pypa/setuptools/issue/209/setup_requires-and-install_requires-dont

Best,

Toby



> Cheers,
> Nick.
>
>>
>> Regards,
>>
>> Toby
>>
>> > On May 24, 2014 12:25 PM, "Toby St Clere Smithe" <mail at tsmithe.net>
> wrote:
>> >
>> >> Daniel Holth <dholth at gmail.com> writes:
>> >> > Just build a wheel first. Then numpy is installed twice but only
> built
>> >> once.
>> >>
>> >> Sure -- but why isn't this automatic? This solution is a bit of a hack
>> >> around what seems a needless inefficiency!
>> >>
>> >>
>> >> Best,
>> >>
>> >> Toby
>> >>
>> >>
>> >> > On May 24, 2014 12:16 PM, "Toby St Clere Smithe" <mail at tsmithe.net>
>> >> wrote:
>> >> >
>> >> >> Hi Ralf,
>> >> >>
>> >> >> Ralf Gommers <ralf.gommers at gmail.com> writes:
>> >> >> > I wasn't actually.
>> >> >>
>> >> >> Well, I'm glad I could be of service, I guess. Should I report this
> as a
>> >> >> bug?
>> >> >>
>> >> >> >> but I wonder if there's any progress
>> >> >> >> for me to be aware of. I've got an extension that I build with
>> >> >> >> distutils. It requires numpy both to build and to run, so I have
>> >> numpy
>> >> >> >> in both setup_requires and install_requires. Yet setup.py builds
>> >> numpy
>> >> >> >> twice -- once for the build stage, and then again on
> installation.
>> >> This
>> >> >> >> seems inefficient to me -- why not just build it once? Is this by
>> >> >> >> design?
>> >> >> >>
>> >> >> >
>> >> >> > Seems fairly inefficient, so I'd guess it's not by design.
>> >> >>
>> >> >> Indeed.
>> >> >>
>> >> >> > Note that if numpy is already installed, you may want to avoid
> adding
>> >> the
>> >> >> > *_requires arguments in order not to silently upgrade or break the
>> >> >> > installed numpy. Something like
>> >> >> > https://github.com/scipy/scipy/pull/3566/files
>> >> >>
>> >> >> This is good advice, but what about the cases in which the build
> machine
>> >> >> is not the installation machine? I already have a versioned
> dependency,
>> >> >> which will on each possible machine (trivially) either be satisfied
> or
>> >> >> not, and if it's not, then it should be.
>> >> >>
>> >> >> Cheers,
>> >> >>
>> >> >> Toby
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Toby St Clere Smithe
>> >> >> http://tsmithe.net
>> >> >>
>> >> >> _______________________________________________
>> >> >> Distutils-SIG maillist  -  Distutils-SIG at python.org
>> >> >> https://mail.python.org/mailman/listinfo/distutils-sig
>> >> >>
>> >> > _______________________________________________
>> >> > Distutils-SIG maillist  -  Distutils-SIG at python.org
>> >> > https://mail.python.org/mailman/listinfo/distutils-sig
>> >>
>> >> --
>> >> Toby St Clere Smithe
>> >> http://tsmithe.net
>> >>
>> >> _______________________________________________
>> >> Distutils-SIG maillist  -  Distutils-SIG at python.org
>> >> https://mail.python.org/mailman/listinfo/distutils-sig
>> >>
>> > _______________________________________________
>> > Distutils-SIG maillist  -  Distutils-SIG at python.org
>> > https://mail.python.org/mailman/listinfo/distutils-sig
>>
>> --
>> Toby St Clere Smithe
>> http://tsmithe.net
>>
>> _______________________________________________
>> Distutils-SIG maillist  -  Distutils-SIG at python.org
>> https://mail.python.org/mailman/listinfo/distutils-sig
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig

-- 
Toby St Clere Smithe
http://tsmithe.net



More information about the Distutils-SIG mailing list