python: stop passing no-user flag on installation#10655
python: stop passing no-user flag on installation#10655dtrodrigues merged 1 commit intoHomebrew:masterfrom
Conversation
|
Review period will end on 2021-02-22 at 18:07:50 UTC. |
Rylan12
left a comment
There was a problem hiding this comment.
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 stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?brew manlocally and committed any changes?--no-useris 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
--userinstalls due to the fact that you cannot do a--userinstall 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 haveuserinstalls as a local configuration.