[Numpy-discussion] Is the build-system section of pyproject.toml a maintained list of the build dependencies?

Warren Weckesser warren.weckesser at gmail.com
Wed Jan 8 11:37:14 EST 2020


On 1/8/20, Warren Weckesser <warren.weckesser at gmail.com> wrote:
> I'm doing some work on the travis-ci scripts, and I'd like to remove
> some redundant calls of 'pip install'.  The scripts should get the
> build dependencies from a configuration file instead of having
> hard-coded pip commands.  Is pyproject.toml the appropriate file to
> use for this?  (Note: we also have test_requirements.txt, but as the
> name says, those are the dependencies for running the tests, not for
> building numpy.)
>

Updating my question:  `pyproject.toml` lists numpy's build
dependencies in the `build_system` section of the file:

[build-system]
# Minimum requirements for the build system to execute.
requires = [
    "setuptools",
    "wheel",
    "Cython>=0.29.14",  # Note: keep in sync with tools/cythonize.py
]

So the file serves the equivalent purpose of a `requirements.txt`
file.  Is there an option to pip that would allow something like

    pip install -r pyproject.toml

(with some other flag or option as needed) to install the build
requirements found in pyproject.toml?  In
https://github.com/numpy/numpy/pull/15275, I wrote a few lines of
Python to get the dependencies from pyproject.toml, but it seems like
that shouldn't be necessary.

Warren


> Warren
>


More information about the NumPy-Discussion mailing list