Pip install git repo as egg fails when specifying target #4139
Labels
auto-locked
Outdated issues that have been locked by automation
C: target
pip install's --target option's behaviour handling
C: vcs
pip's interaction with version control systems like git, svn and bzr
Description:
We have a python 2/3 compatible application and are using PyPI packages in conjunction with several private github repos. We're using a
requirements.txt
file to specify dependencies, in the form:When run with
pip install -r requirements.txt -t lib/
I expect the packages to get installed as eggs to thelib
directory, however instead I get the following error:This happens for both private and public repos, with or without
-e .
, and with either multiple or a single repository listed in therequirements.txt
(and all permutations thereof). It does not happen when I install a PyPI package such aspip install requests
, even when installing from arequirements.txt
to a target viapip install requirements_no_git.txt -t lib/
(as long asrequirements.txt
contains no git repos).I am fairly sure the
requirements.txt
file is correctly formatted as runningpip install -r requirements.txt
succeeds and correctly installs the packages (even when containing git repos).What I've run:
One workaround I've found works is to separate the deps into two requirements files,
requirements.txt
andrequirements_no_git.txt
, whererequirements.txt
contains all the git repos and ``requirements_dev.txtcontains all the PyPI packages. Then I simply run
pip install requirements.txt`Then rename the folder to lib
`mv src lib`
Then install the PyPI packages to the `lib` target
`pip install -r requirements.txt -t lib`
This gets generally the same results a simply installing all to
lib/
, but it is still inconvenient.The text was updated successfully, but these errors were encountered: