You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using local URLs (e.g. somepackage @ git+file:///somepath) in install_requires seems like not supported. Currently running python setup.py install or pip install . causes error.
(.venv) omer@omer:~/src/pip-subdir-example$ python setup.py installerror in mainpackage setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid URL given(.venv) omer@omer:~/src/pip-subdir-example$ pip install .Processing /home/omer/src/pip-subdir-example ERROR: Command errored out with exit status 1: command: /home/omer/src/pip-subdir-example/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-_h1z9t2a/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-_h1z9t2a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4452gi_r cwd: /tmp/pip-req-build-_h1z9t2a/ Complete output (1 lines): error in mainpackage setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid URL given ----------------------------------------ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Version Info
OS: Debian 10 (Buster)
Issue
Using local URLs (e.g.
somepackage @ git+file:///somepath
) in install_requires seems like not supported. Currently runningpython setup.py install
orpip install .
causes error.Here is a minimal example:
See https://github.com/ozars/pip-subdir-example for complete code. (Run
git init
indeps/subpackage
to treat it like a git submodule.)Above code gives this error:
I figured out that it is caused by these lines:
setuptools/pkg_resources/_vendor/packaging/requirements.py
Lines 97 to 102 in 6214d4d
Above code is under
pkg_resources
and it looks like the root cause. There is a similar code piece undersetuptools
, but it is handled differently:setuptools/setuptools/_vendor/packaging/requirements.py
Lines 102 to 106 in 6214d4d
This part is updated by bf069fe in #1829.
I was wondering if it's possible to support this behavior. Thanks.
The text was updated successfully, but these errors were encountered: