Pip use local module installed with -e instead of from git

Viewed 53

I am trying to develop for 2 different Python 3 Modules and pip. In order to develop and test them without rebuilding, I am using pip install -e. One module is dependent on another, and they are both NOT found on PyPI (git install only).

My current method of development is to pip install -e Module2/., then remove Module1 (since it is installed from git) with pip uninstall Module1 and then reinstall with pip install -e Module1/.

How do I prevent one module from automatically installing from git instead of using the local module that is installed with the -e flag? Thank you!

My setup.py file:

import setuptools
from setuptools import  find_packages

setuptools.setup(
    name="Module2",
    version="1.3",
    install_requires=[
        "Module1 @ git+[Module1_Git_Link].git",
        "numpy",
        "scipy",
        "pandas",
        "matplotlib"
    ],
    packages=find_packages()
)

My requirements.txt file:

Module1>=1.3.2
numpy
scipy
matplotlib
pandas

Edit 1: I don't want to use dependency_links because that has been deprecated/removed in recent versions of pip

0 Answers
Related