Installing with pip
, I can write the following requirements.txt
file:
git+https://repo@branch#egg=foo&subdirectory=this/bar/foo
numpy
And successfully install the requirements file:
python3 -m pip install -r requirements.tx
However, I have co-located in the directory a setup.py
script that lists:
setuptools.setup(
...
install_requires = get_lines('requirements.txt'),
...
)
And installing this submodule using pip
involves pip
running setup.py
...which fails to handle the module link:
git+https://github.com/repo@branch#egg=foo&subdirectory=this/bar/foo
I can see a lot of ways around this, but it seems like there should be one non-ambiguous way to do this which changes as little as possible in the setup.py
script.
Is there such a way?
question from:
https://stackoverflow.com/questions/65850386/python3-install-github-based-module-in-setup-py 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…