0

I have implemented a python library that needs a python module existing on pip.

For various reasons (not relevant for this question) I had to bring some modification to this module, so I cloned it in my own private repo on github and I used the latter.

To install the module from my private repo, i did this in the Dockerfile of the library:

add deps.txt /deps.txt
run pip install -r /deps.txt

where in deps.txt i have:

-e git://github.com/Private/my_module.git@dcdf3b2e7ffb7c4dd7831ea7795fabce0e4944rc#egg=my_module

When I build the docker container I can see from the log that the module that is installing is actually the one I cloned in my repo on git.

The problem is when I try to install my library with the setup.py that is made like this:

from setuptools import setup, find_packages
try: # for pip >= 10
    from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
    from pip.req import parse_requirements
install_reqs = parse_requirements('deps.txt', session='hack')
reqs = [str(ir.req) for ir in install_reqs]
setup(name='Library',
    version='0.0.0',
    ...
    packages=find_packages(),
    install_requires=reqs,
    zip_safe=False)

in this case the module that will be installed isn't mine but the one existing in pip. Looks like if he didn't care about the command -e git://github.com/....

luke88
  • 958
  • 19
  • 40
  • Possible duplicate of [Python setuptools: How can I list a private repository under install\_requires?](https://stackoverflow.com/questions/18026980/python-setuptools-how-can-i-list-a-private-repository-under-install-requires) – phd Nov 06 '19 at 11:53
  • https://stackoverflow.com/search?q=%5Bsetuptools%5D+%22install_requires%22+git – phd Nov 06 '19 at 11:53
  • 1
    https://stackoverflow.com/a/54216163/7976758 – phd Nov 06 '19 at 11:54

0 Answers0