Skip to content

ENH: add pyproject.toml - #14053

Merged
seberg merged 1 commit into
numpy:masterfrom
mattip:pyproject.toml
Jul 23, 2019
Merged

seberg merged 1 commit into
numpy:masterfrom
mattip:pyproject.toml

Conversation

@mattip

@mattip mattip commented Jul 18, 2019

Copy link
Copy Markdown
Member

xref #13908

Add a pyproject.toml file. Needed for towncrier.

This has already hit the mailing list, and met with hesitant approval since it causes pip install . to do an "isolated build" which may download a new cython, lengthening the build.

SciPy has added a pyproject.toml, and it doesn't seem to have caused too much pain.

@seberg seberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to get this in soon to use towncrier (and simplify release notes). I think it is likely that towncrier allows a different name for the file soon (i have a PR open, although it may require tests). So if this creates trouble we can probably easily revert it anyway.

@seberg

seberg commented Jul 19, 2019 •

Copy link
Copy Markdown
Member

Hmmm, from Pauli's mail:

[...] there is some end-user impact (would e.g. have to be mentioned in release notes).

You probably also need to disable build isolation in numpy-wheels, to
manage the dependency versions manually. It probably also should be
mentioned in install instructions somewhere.

The main thing to watch out with introducing pyproject.toml is that
build-time dependencies for non-pure-Python packages work properly only
with pip 19 (unless they have wheels), which is fairly
recent.

@seberg

seberg commented Jul 23, 2019

Copy link
Copy Markdown
Member

OK, since nobody spoke up against it. I will put this in to try it out, if it creates downstream issues we can revert it. Towncrier does not seem to be responsive about adding --pyproject option or so, but I expect it will happen at some point, so that by the time we actually make a release it does not matter much if this is in or not.

@seberg
seberg merged commit bc78f06 into numpy:master Jul 23, 2019
@seberg

seberg commented Jul 23, 2019

Copy link
Copy Markdown
Member

Oooops, had forgotten about my own comment. Will make an issue to document this ://

@mattip
mattip deleted the pyproject.toml branch August 8, 2019 17:19
@tvalentyn

Copy link
Copy Markdown

In https://issues.apache.org/jira/browse/ARROW-8983 we observed that on Py3:

python -m pip download --dest /tmp numpy==1.17.5 --no-binary :all:

finishes immediately, while:

python -m pip download --dest /tmp numpy==1.18.0 --no-binary :all:

takes a while to complete. Could this PR be causing this? If yes: is this something that should be fixed or it's a known behavior and is considered WAI?

@seberg

seberg commented Jun 2, 2020

Copy link
Copy Markdown
Member

Probably related, though not sure if that is expected or not, maybe ask at pip? You can get the old behaviour by using:

python3 -m pip download --dest /tmp numpy==1.18.0 --no-binary :all: --no-use-pep517

We don't technically need the pyproject.toml, but it seems like the right thing to have nowadays?

@tvalentyn

Copy link
Copy Markdown

Thank you. Asked in pypa/pip#8387.

@pv

pv commented Jun 3, 2020 •

Copy link
Copy Markdown
Member

Strictly speaking, Numpy does need pyproject.toml if you want to build without having first installed Cython manually, as pre-generated sources are no longer included in the sdist. That pip download apparently needs to run setup.py is then a bit annoying, as it then has to also pull the build deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants