-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency regarding installing from VCS #5384
Comments
The #egg= fragment is not for specifying a PEP 508 specification.
That's #4187.
I think if you use the @tag syntax, you'll be able to specify the version. |
If that addresses your concerns, please close this issue. If not, feel free to ask more questions here. :) |
Thanks for answering @pradyunsg, I've read #4187 and as far I can see, there is no definitive alternative yet. About using the @tag syntax, I guess it will work, however, this causes an implication that every time a library is updated, I will need to change the dependency url to another specific version:
I want to know if there is a way to use the "compatible" version definition, like:
and then specify the url as:
And let pip figures out with version to checkout from the repo. |
How pip deals with VCS repositories today is given a VCS repo, it checks out either the provided tag/revision or the default ref/revision (i.e. master on git repos?). This is used as a source distribution. So, really, pip only ever sees the repository in one state. I don't think it's feasible for pip to look into the history of a git repository to determine whether there's a compatible version available. That would require either checking out each revision and processing it to get the version metadata or making assumptions about the tagging scheme etc. I think one approach that might work for you here is to have a That way, your requirement would just be |
PS: @tag sorry for the random mentions. Hope you have a good day. :) |
Hum, I see. Thanks for answering.
This is exactly how I keep my projects, using the Git Workflow with semantic versioning. It works fine when releasing patches or minors (since pip always installs latest snapshot avaiable in a branch), but if I release a new major and some project, that depends on that library, brokes with the new update, how to limit the project to a "compatible" version (like >=3.0,<4)? I understand that I could use the url I've found this link that explains the use of a option Then my question is, should I try the link's approach or go for a private PyPI? What would be better? |
I will close the issue. I'm sticking with pinned versions using @tag syntax. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
I have a package (call it mypackageA) that is in a private git repository.
setup.py (package mypackageA)
pyproject.toml (mypackageA)
I can install it directly using the following command:
However, it does not honor the version requested:
And when declaring the mypackageA as a dependency to another package (say it myprojectB), like this:
setup.py (package mypackageB)
pyproject.toml (mypackageB)
And trying to install mypackageB:
The command fails:
But using:
setup.py (package mypackageB)
Then running:
The installation successfully occurs (despite the deprecation warning regarding '--process-dependency-links'), but it installs the last available version from the repository, ignoring the versions specified at "#egg" and "install_requires".
So my questions are:
The text was updated successfully, but these errors were encountered: