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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip tries to parse PEP 508 URLs in pyproject.toml's [build-system] requires as file path #6405

Closed
ghost opened this issue Apr 13, 2019 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: bug A confirmed bug or unintended behavior

Comments

@ghost
Copy link

ghost commented Apr 13, 2019

Environment

  • pip version: tox doesn't tell me 馃槰
  • Python version: 3.7
  • OS: Fedora GNU/Linux

Description
This is what happens when attempting to specify "wobblui @ https://github.com/wobblui/wobblui/archive/master.zip":

  Requirement 'wobblui @ https://github.com/wobblui/wobblui/archive/master.zip' looks like a filename, but the file does not exist
  Processing ./wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip
  Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/jonas/Develop/myproj/wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip'

Expected behavior
That it works, because it also works in seutp_requires and this is the recommended replacement, right?

How to Reproduce
Use this pyproject.toml:

[build-system]
requires = ["setuptools", "wheel", "wobblui @ https://github.com/wobblui/wobblui/archive/master.zip"]
build-backend = "setuptools.build_meta"

Output

  Requirement 'wobblui @ https://github.com/wobblui/wobblui/archive/master.zip' looks like a filename, but the file does not exist
  Processing ./wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip
  Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/jonas/Develop/myproj/wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip'
@cjerdonek
Copy link
Member

I believe this is a duplicate of #6202?

@ghost
Copy link
Author

ghost commented Apr 13, 2019

Hmm that one seems to mention requirements.txt and I wouldn't know if internally uses the same mechanism. If it does uses the same one, then it's probably a duplicate 馃憤

@cjerdonek
Copy link
Member

I'm pretty sure it uses the same mechanism, but I guess it can't hurt to keep this open until we're sure it's fixed.

@chrahunt
Copy link
Member

For what it's worth, pip from the PR associated with that issue (#6203) was able to install the pyproject.toml provided here without issue.

@chrahunt chrahunt added resolution: duplicate Duplicate of an existing issue/PR S: awaiting response Waiting for a response/more information type: bug A confirmed bug or unintended behavior labels Jul 21, 2019
@triage-new-issues triage-new-issues bot removed S: needs triage Issues/PRs that need to be triaged labels Jul 21, 2019
@chrahunt
Copy link
Member

#6203 was merged and I was able to confirm the fix against master:

fixed.sh
#!/bin/sh
cd "$(mktemp -d)"
python -m venv .venv
. .venv/bin/activate

set -ex
pip install --upgrade git+https://github.com/pypa/pip.git
cat <<EOF > pyproject.toml
[build-system]
requires = ["setuptools", "wheel", "wobblui @ https://github.com/wobblui/wobblui/archive/master.zip"]
build-backend = "setuptools.build_meta"
EOF
echo "from setuptools import setup; setup(name='hello')" > setup.py
pip install .
Output
+ pip install --upgrade git+https://github.com/pypa/pip.git
Collecting git+https://github.com/pypa/pip.git
  Cloning https://github.com/pypa/pip.git to /tmp/user/1000/pip-req-build-vj85ywtn
  Installing build dependencies ... done
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
  Running setup.py install for pip ... done
Successfully installed pip-19.3.dev0
+ cat
+ echo from setuptools import setup; setup(name='hello')
+ pip install .
Processing /tmp/user/1000/tmp.xAtiVhhzb7
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: hello
  Building wheel for hello (PEP 517) ... done
  Created wheel for hello: filename=hello-0.0.0-cp37-none-any.whl size=971 sha256=777a97a967e962ad9ae4d085b5eb369b8ead6340b4c1faae4cc42707a170bd1b
  Stored in directory: /tmp/user/1000/pip-ephem-wheel-cache-rvibo0ng/wheels/15/31/64/f6d8e3210b2f9a59fb104fc18d2651440f5e6d328adeca6341
Successfully built hello
Installing collected packages: hello
Successfully installed hello-0.0.0

so I will close this issue as a duplicate. Please let me know if you see something different!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Oct 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2019
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
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 type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants