Created
February 4, 2019 01:14
-
-
Save phaustin/ad725619a93440ab6b8554f32ca0a751 to your computer and use it in GitHub Desktop.
pip local packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| On Tue, 29 Jan 2019 at 23:40, Donald Stufft <[email protected]> wrote: | |
| > | |
| > You can also just stick files in a directory and use pretty much any web server that generates an automatic index from it. | |
| Including python3 -m http.server! (I wouldn't recommend using that on | |
| the public internet, but it can be very handy on a private intranet). | |
| Going back to the specific case of: | |
| "So, let's say that I have dependency "C @ | |
| https://github.com/owner/C.git@3" in project B and "C @ | |
| https://github.com/owner/C.git@1" in project A." | |
| The recommended way of handling that would be to: | |
| 1. change the dependency declarations to be "C >= 3" and "C >= 1" | |
| 2. use `pip wheel` to create a wheel file for project "C" yourself | |
| 3. drop that wheel file into a web directory or shared filesystem | |
| 4. add `-f <URL-for-the-location-in-step-3>` to your install commands | |
| If using `pipenv`, then step 4 can be automated by defining an | |
| additional `source` location in each project's Pipfile. | |
| Tools like devpi, pinrepo, Artifactory, etc can also be considered as | |
| potentially nicer ways of managing steps 2 & 3. | |
| Cheers, | |
| Nick. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment