Similar use case as in #176 and possibly #223 -- I'm trying to eliminate duplication between setup.py and requirements.in. Here's a small repro:
$ cat requirements.in
-e .
$ cat setup.py
from setuptools import find_packages, setup
setup(
name='foobar',
install_requires=[
'contextlib2',
],
)
$ pip --version
pip 7.1.0 from /Users/blampe/src/pip-tools-test/env/lib/python2.7/site-packages (python 2.7)
$ pip-compile --version
pip-compile, version 1.6
$ pip-compile --no-index
#
# This file is autogenerated by pip-compile
# Make changes in requirements.in, then run this to update:
#
# pip-compile --no-index requirements.in
#
-e file:///Users/blampe/src/pip-tools-test
contextlib2==0.5.1
I'd expect this to only include contextlib2 but it also has an unportable "-e" path. This causes errors when trying to install from requirements.txt on any other machine.
FWIW, I _would_ expect it to keep the -e ., because the foobar package still needs to be installed. For my own uses, it still needs to be installed because I have the package in a src directory (so that it's not importable without installation), and because it installs a script. It just needs to remain a relative path so that it doesn't break when installed in a different repository, machine, etc.
Yeah totally agree, I have a similar use case. The real problem is that it's an absolute path instead of relative. Feel free to close this if it's a dupe of #204.
Closing as duplicate to #204, let's continue there.
The known workaround is -e file:.#egg=foobar. See https://github.com/jazzband/pip-tools/issues/204#issuecomment-550051424.
Most helpful comment
Yeah totally agree, I have a similar use case. The real problem is that it's an absolute path instead of relative. Feel free to close this if it's a dupe of #204.