pypa / pypa/setuptools

Setuptools install fails with PEP508 URLs

Open
#1,983 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

setuptools v 45.1.0
pip v 20.0.2

Running python setup.py install for a setup.py which includes PEP508 format URLs in the install_requires field results in failure.
for example if keras @ https://github.com/MarcBS/keras/archive/master.zip is in the install_requires field then setuptools fails to find it, and looks on PyPI instead, installing a matching package (in this case 'keras').
However, running pip install . for the same setup.py succeeds, similarly with pip install keras @ https://github.com/MarcBS/keras/archive/master.zip.

If setuptools always uses pip to install dependencies, then why does it fail for PEP508 URL dependencies when pip is able to do this?

In summary:

  • pip install . works ✔️
  • pip install 'keras @ https://github.com/MarcBS/keras/archive/master.zip' works ✔️
  • python setup.py install fails ❌

(further to this, PyPI throws an error when uploading a package with a setup.py containing PEP 508 dependency links)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the difference between python setup.py install and the successful pip install . commands using a setup.py with the shown PEP 508 URL in install_requires. Trace the setuptools installation path and compare its dependency handling with pip; done means URL requirements install correctly without falling back to a matching PyPI package, while preserving the existing pip behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.