0

I have one repository referencing another and need to define the relationship using a git repo requirement, see Install Python Package From Private Bitbucket Repo:

pip install git+https://USER_NAME@GIT_URL/PATH_TO_YOUR_REPO.git@branch

Now, while working on both repositories locally, I would like the referencing one to use the local copy and not from git.

Normally then you just setup the other project from the referencing project venv, which I know to ways to accomplish:

pip install -e PATH_TO_PROJECT

Which results in the following requirement, that depends on you actually commiting to the referenced project:

-e git+https://USER_NAME@GIT_URL/PATH_TO_YOUR_REPO.git@LAST_COMMIT_HASH#egg=SETUP_NAME

or the following, which is up to date with local changes:

python PATH_TO_PROJECT/setup.py install develop

How would you go about switching between requirements? What is the best approach here?

3
  • I don't think you can combine --editable and git+https in one requirement. Editable installs are done from local FS only, IIRC. Commented Aug 1, 2018 at 6:38
  • 2
    @hoefling -e and VCS URLs can be combined, no problem, see pip.pypa.io/en/stable/reference/pip_install/#git. pip clones the repo and runs python setup.py develop in it. Commented Aug 1, 2018 at 13:11
  • @phd you are right, this just works out of the box Commented Aug 2, 2018 at 6:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.