[SciPy-Dev] Making it easier to pin numpy in pyproject.toml

Ralf Gommers ralf.gommers at gmail.com
Fri Nov 29 20:40:48 EST 2019


On Wed, Nov 27, 2019 at 1:32 AM Thomas Robitaille <
thomas.robitaille at gmail.com> wrote:

> Hi Ralf and Prabhu,
>
> Thanks for your feedback! I should have clarified this originally, but
> pyproject.toml (in oldest-supported-numpy) is not the right place to
> define the Numpy pinnings since pyproject build requirements are only
> relevant for building wheels of oldest-supported-numpy (they would not
> be inherited by downstream packages using oldest-supported-numpy).
> Numpy needs to be a runtime dependency of oldest-supported-numpy
> because in this case 'runtime' means inside the downstream build
> environment.
>
> In fact, I deliberately have only published a universal wheel (no
> sdist) on PyPI for oldest-supported-numpy which means that
> pyproject.toml would never actually be used, and in addition this
> means that setuptools will not get invoked in the process either. The
> oldest-supported-numpy wheel only contains a bunch of metadata (no
> setup.cfg or setup.py) of which the main one that is relevant here is
> Requires-Dist which I think will be directly interpreted by pip.


Ah yes, that sounds correct.

So back to your original question: do we want to maintain this under the
SciPy org. It sounds like a useful idea to me. What do others think?

Also Tom, do you want to remain one of the maintainers of this package when
we move it under https://github.com/scipy/?

Cheers,
Ralf


I  will double check with the pip folks but I think that this means that
> this approach should be equivalent to pinning numpy manually.
>
> Cheers,
> Tom
>
> On Wed, 27 Nov 2019 at 05:18, Prabhu Ramachandran
> <prabhu at aero.iitb.ac.in> wrote:
> >
> > Hi Thomas,
> >
> > Thanks for doing this, I think this would be very useful for multiple
> projects that use numpy as a build dependency.  I agree with Ralf that it
> would perhaps make more sense to have a pyproject.toml with the correct
> requirements in the oldest-supported-numpy project in addition to or in
> place of the setup.cfg you have.
> >
> > Regards,
> > Prabhu
> >
> >
> > On 11/26/19 3:22 PM, Thomas Robitaille wrote:
> >
> > Hi all,
> >
> > As a developer of several packages that have numpy as a build-time
> > dependency, I've been having to specify pinned versions of numpy in
> > pyproject.toml files with environment markers, as is done by scipy:
> >
> > https://github.com/scipy/scipy/blob/master/pyproject.toml#L6
> >
> > I've also noticed that different packages are sometimes inconsistent
> > in what exact versions they use, and the scipy pinnings are also a
> > little more advanced since they take into account the platform too
> > (specifically the AIX case at the moment).
> >
> > [...]
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20191129/e0bfdf7e/attachment.html>


More information about the SciPy-Dev mailing list