-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Add pip-sync option to restrict attention to user-local directory. #642
Conversation
Hi @jbergknoff-10e, thanks for the PR! First-off, I'd like to point out that using Nonetheless, this is still a good feature to have on
For the tests, given the nature of the change, you can skip that. Sometime, "perfect" is the enemy of "better". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks! I've updated the CLI parameter to Tangent on usage in a container: what you say is largely true. However, during development, when it makes more sense to volume the vendor directory into a container than to build it into an image, it's convenient to have that vendor directory front and center (i.e. Here's a quick rundown of how I've manually tested this change:
So Flask and its dependencies get installed in /tmp/vendor, and bumpversion gets installed globally. The pip-compile output has just requests and its dependencies. The result of |
Excellent, thanks for the tests and detailed report. |
Thanks for the PR! |
I'm setting up Python code in Docker images, setting a project-local
PYTHONUSERBASE
environment variable and installing packages withpip install --user ...
. This is instead of using a virtual environment, as described in this article.Currently pip-tools almost works with
--user
-installed packages: ifPYTHONUSERBASE
is set then pip-sync will run, but it will look at all packages. This PR is essentially a one-line change to add support for managing packages installed in a user-local directory.I'd appreciate advice on adding a test. It doesn't look like there's currently much coverage for how the
pip-sync
CLI tool operates.Changelog-friendly one-liner: Adds pip-sync option to restrict attention to user-local directory.
Contributor checklist