Installing only specific dependencies with --pre flag

Viewed 170
  • My team works on packages "A" and "B".
  • Package "A" depends on package "B" but also depends on package "C" which is 3rd party.
  • I am working on package "A" pre-release version and want to install all of its pre-release dependencies belonging to the same team. I simply run pip install . --pre --upgrade (it works, because the dependencies are specified in setup.py) and I suddenly find out that --pre flag was propagated to a 3rd party dependency "C". And I don't want that - I only want to install my pre-releases.

Question: what would be the most sensible way to distinguish internal/external dependencies?


P.S. I have thought of some solutions, but they do not seem very elegant.

Solution 1: Use two requirement.txt files. One will contain internal dependencies and will be run with --pre flag. Another will contain 3rd party dependencies and will be run without the flag.

0 Answers
Related