Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyproject.toml without build-backend should auto-fallback to setup.py #6453

Closed
scop opened this issue Apr 28, 2019 · 4 comments
Closed

pyproject.toml without build-backend should auto-fallback to setup.py #6453

scop opened this issue Apr 28, 2019 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@scop
Copy link
Contributor

scop commented Apr 28, 2019

Environment

  • pip version: 19.1
  • Python version:
  • OS:

Description

https://github.com/scop/hashpipe/tree/3cbb1283dfe55f7934a86650d2f474240ef2fff1

I have a pyproject.toml file with [tool.black] only. Running tests with tox I get pip 19.1 which errors out: https://travis-ci.org/scop/hashpipe/builds/525585963

ERROR: Error installing 'file:///.../hashpipe': editable mode is not supported for pyproject.toml-style projects. pip is processing this project as pyproject.toml-style because it has a pyproject.toml file. Since the project has a setup.py and the pyproject.toml has no "build-backend" key for the "build_system" value, you may pass --no-use-pep517 to opt out of pyproject.toml-style processing. See PEP 517 for details on pyproject.toml-style projects.

Expected behavior

PEP 517 says:

If the pyproject.toml file is absent, or the build-backend key is missing, the source tree is not using this specification, and tools should fall back to running setup.py.

My case is this one (build-backend key is missing), so per the PEP, pip should automatically fall back to using setup.py and not ask me to opt out of it with --no-use-pep517 (which would be inconvenient and I believe fail on pip versions that don't have that flag).

How to Reproduce

See github.com/scop/hashpipe link above.

Output

See above.

@meejah
Copy link

meejah commented May 2, 2019

Same situation for a project I contribute to, except we're using pyproject.toml to configure towncrier (only). For now we're limiting pip < 19 for everything, which is obviously not ideal...

@florisla
Copy link

florisla commented May 2, 2019

This is fixed in #6449 and will probably be released as pip v19.1.1.

A longer discussion is in #6434.

Good catch on the PEP517 excerpt about falling back to setup.py, it's nice to know I'm not violating the PEP by simply using black ;-)

@meejah
Copy link

meejah commented May 2, 2019

For the record, I tried pip master, and it works fine for my use-case. 👍

@pradyunsg
Copy link
Member

Duplicate of #6434.

@pradyunsg pradyunsg added the resolution: duplicate Duplicate of an existing issue/PR label May 7, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

4 participants