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
python: stop passing no-user flag on installation #10655
Conversation
Review period will end on 2021-02-22 at 18:07:50 UTC. |
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.
I agree. If --no-user
is "not a supported end-user flag" we shouldn't use it.
Separately, is it still possible for a user's global pip
configuration file to affect builds? Should/can we handle this? I'm not just thinking about the --user
or --no-user
issue. Are there other settings that could be set in one of these that would affect the build? It's possible that we manually override everything that needs to be controlled, I'm just not familiar enough to judge.
Yes - a user's global pip configuration does affect builds, but not their local configuration (since $HOME is replaced by .brew_home) or their environment variables (filtered out). Running on macOS, during a build from source (for example for the
On Linux, it is
There are some settings which can be beneficial when passed into the Homebrew python building of a formula from source (see Homebrew/discussions#863). The only way to manipulate those is by changing the global config file, which typically requires administrative privileges. The cases in which we want to allow a user to influence their formula builds and how much is an open question and a tradeoff between reproducibility and customization. FWIW, the |
Gotcha, thanks |
Makes sense 👍🏻 |
Review period ended. |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?--no-user
is not a supported end-user flag in pip, and is explicitly non-documented: pypa/pip#8977 (comment)pypa/pip@87bb4f9
It was added as part of building python packages from source in case a user's configuration specified
--user
installs due to the fact that you cannot do a--user
install within avenv
:Recent versions of pip fall back to a user installation if site-packages is not writeable. Additionally, when building a formula, only the global and site pip configurations are looked at -- the user configuration is empty within
..../.brew_home/
, so this change in Homebrew doesn't impact users who haveuser
installs as a local configuration.