-
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
pip freeze -r requirements.txt strips URLs #452
Comments
When pip installs a tarball from a specific URL, it currently doesn't record that "source" metadata with the installed package, so the only available metadata is the setup.py version, which is why that is what's reflected in the output of It would be possible for pip to save the exact source line in a custom metadata file in the egg-info directory, and I think this would be reasonable. Then Pull request welcome! (I think @dstufft may have also had some interest in working on this.) |
Yea i've been planning on storing the exact tarball, the requirements line, probably any other data about what and from where a package was installed from that I can locate. I havn't had time yet but it's something I plan on doing as soon as I can (if someone doesn't beat me). |
the open PR for this: #507 |
How this issue still didn't get fixed? The #507 already got closed! I think this is important: it is not a good manner that when u commit a project u commit all ur dependencies modules, better let the other people can rebuild the environment by just running 'pip install -r requirements.txt', but unfortunately, it will fail because pip strips the source url info. Every time I need to manually maintain the requirements.txt just because 'pip freeze' will strip the info again and again. |
I'm going to close this. Directly referencing an URL like that is sort of fraught with issues, this being one of them. A better answer would be to do something like
This should then work correctly. |
This is very similar to issue #43.
When running 'pip freeze -r requirements.txt', the output generated does not contain the package URLs specified in the referenced requirements.txt. For example, if I had a line like this in my requirements.txt:
Then the output associated with that line would just be:
Subsequent runs of 'pip install -r requirements.txt' then fail, since mypackage is not in a repository that pip searches.
Ideally, if a user installed a package by referencing a URL, e.g.:
Then a simple 'pip freeze' would contain that URL so that future pip runs install from it.
The text was updated successfully, but these errors were encountered: