question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chrahuntcommented, Jul 21, 2019

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.

0reactions
chrahuntcommented, Sep 22, 2019

#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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 517 – A build-system independent format for source trees
Here we define a new style of source tree based around the pyproject.toml file defined in PEP 518, extending the [build-system] table in ......
Read more >
pyproject.toml - pip documentation v22.3.1
This file contains build system requirements and information, ... requirement specifiers follow PEP 508, so it's possible to reference packages with URLs.
Read more >
Announcing Poetry 1.2.0 | Blog
Guidance on modifying $PATH is provided, but the user's configuration is not altered by automated tools. Poetry will be installed using the ...
Read more >
tox configuration specification — tox 3.24.5 documentation
For build tools and arguments use the pyproject.toml file as specified in PEP-517 and PEP-518. To specify the virtual environment Python version define...
Read more >
rpms/pyproject-rpm-macros - src.fedoraproject.org - Tree
'Add PackageName@ (see PEP 508) to the URL to at least require any version of ... If the pyproject.toml file is absent, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found