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

pip install requires --no-build-isolation #3704

Closed
blueyed opened this issue Apr 19, 2019 · 4 comments
Closed

pip install requires --no-build-isolation #3704

blueyed opened this issue Apr 19, 2019 · 4 comments
Labels

Comments

@blueyed
Copy link
Contributor

blueyed commented Apr 19, 2019

Trying to install aiohttp from the Git repo results in:

% pip install -e .
…
  Getting requirements to build wheel ... error
  Complete output from command /home/daniel/.pyenv/versions/tmp-system-aiohttp-n3RpAV/bin/python /home/daniel/.pyenv/versions/tmp-system-aiohttp-n3RpAV/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp23d44iu3:
  Install cython when building from git clone
  Hint:
    pip install cython

  ----------------------------------------
Command "/home/daniel/.pyenv/versions/tmp-system-aiohttp-n3RpAV/bin/python /home/daniel/.pyenv/versions/tmp-system-aiohttp-n3RpAV/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp23d44iu3" failed with error code 1 in /home/daniel/Vcs/aiohttp

However cython is installed already, and this is caused by pip using a special mode since there is a pyproject.toml file. pip install --no-build-isolation -e . works.

See pypa/pip#5416 (comment).

@asvetlov
Copy link
Member

Thanks for the report.
@webknjaz and I are trying to find now a quick fix but long-term solution.
Please stay tuned.

@webknjaz
Copy link
Member

Duplicate of #3581

@webknjaz webknjaz marked this as a duplicate of #3581 Apr 19, 2019
blueyed added a commit to blueyed/aiohttp that referenced this issue Apr 19, 2019
@blueyed
Copy link
Contributor Author

blueyed commented Apr 19, 2019

Thanks for working on this already.

Given that #3581 is quite involved and might take some more time you might want to consider just not using pyproject.toml for now - pip triggers this behavior just because the file is there, and you are only using it for [tool.towncrier].

A trivial fix is the following. But I can see that this might not work in general, and something like #3589 is needed.

diff --git a/pyproject.toml b/pyproject.toml
index e666dfc1..bc9a22ad 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,3 +5,6 @@ directory = "CHANGES/"
 title_format = "{version} ({project_date})"
 template = "CHANGES/.TEMPLATE.rst"
 issue_format = "`#{issue} <https://github.com/aio-libs/aiohttp/issues/{issue}>`_"
+
+[build-system]
+requires = ["setuptools>=40.8.0", "wheel", "cython"]

@webknjaz
Copy link
Member

webknjaz commented Apr 19, 2019

@blueyed yes, we're considering temporary removal of pyproject.toml and your solution suggests that the end-users must have a build toolkit (gcc and libs) because otherwise cython install will fail.
In our case, we need it to be optional which is quite tricky.

I hope to have some kind of solution today anyway. I think that currently, we should just recommend --no-build-isolation for dev env and discourage any uses or -e in non-dev envs.

@webknjaz webknjaz changed the title pip install requires --no-use-pep517 pip install requires --no-build-isolation Apr 19, 2019
@lock lock bot added the outdated label Apr 18, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants