0

I have one Python project in Gitlab ("project a") that calls another Python project in Gitlab ("project b") for configuration and libraries.

This link: How to state in requirements.txt a direct github source is from 8yrs ago and does not refernce gitlab but rather github. I don't think it's relevant to my situation.

Normally "project a" calls in "project b" via the requirements.txt file, with a protected tag in the "project b": project-b==5.1.0

When developing new code in "project b" for consumption in "project a" , I wish to make "project a" call "project b" but specifically usign the development branch in "project b", not the protected tag from Master.

I am trying to do this in the requirements.txt in "project a": project-b==<dev-branch>-<commit-tag>

For example: dev branch in "project b" = "new-feature", commit tag = "e9fa2xyx"

project-b==new-feature-e9fa2xyx

However my make is failing after this change, saying "no matching distribution found"

Do I have the wrong syntax for pulling in that dev branch via requirements.txt in "project a"?

Robert Campbell
  • 303
  • 3
  • 12
  • https://stackoverflow.com/search?q=%5Bgit%5D+%5Bpip%5D+branch+requirements.txt – phd Apr 30 '22 at 16:15
  • In `requirements.txt`: `git+https://gitlab.com/path/to/package-b@new-feature#egg=package-b` (or `@e9fa2xyx` but not both). – phd Apr 30 '22 at 16:16
  • that seems to be making the 'make' process do a 'git clone' instead of a 'pip install' – Robert Campbell Apr 30 '22 at 16:34
  • `git clone` is ran as part of `pip install`. How do you expect `pip` to install from a commit without cloning that commit? – phd Apr 30 '22 at 16:51
  • I was never able to ge the `git+https` format working in my environment, but I was able to get things working by doing this: in IDE , created Python virtual env. Then id pip install package-name-commit-tag, then edited requirements.txt with package-name-- , and then ran `make`. Thanks for the help. – Robert Campbell May 03 '22 at 20:13

0 Answers0