-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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 pipInstallFlags to all pip install invocations in python hooks #244444
Conversation
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.
Also, I this this PR triggers many rebuilds, so I'd make it target branch python-updates
that is worked on in #244135 . We could also ask @SuperSandro2000 for a review.
@@ -25,7 +27,7 @@ pipShellHook() { | |||
export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH" | |||
mkdir -p "$tmp_path/@pythonSitePackages@" | |||
@pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" \ | |||
--no-build-isolation >&2 | |||
--no-build-isolation $pipInstallFlags >&2 |
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.
@@ -33,7 +35,7 @@ setuptoolsShellHook() { | |||
export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH" | |||
mkdir -p "$tmp_path/@pythonSitePackages@" | |||
eval "@pythonInterpreter@ -m pip install -e . --prefix $tmp_path \ | |||
--no-build-isolation >&2" | |||
--no-build-isolation $pipInstallFlags >&2" |
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.
You do have a point about this flag though! And this is a change in behavior that needs to be documented. I also wonder: very few packages depend on setuptoolsBuildHook
, so how did this requirement arise for you?
Friendly ping @balattar |
Closing due to no reply by OP. |
Description of changes
Resolves #172936
The pipInstallFlags environment variable was only being passed to the
pip-install-hook
. This causes other invocations of pip (like insetup-tools-build-hook
andpip-build
hook`) to effectively ignore the pipInstallFlags argument to the buildPythonPackage function.This PR resolves the issue by adding the install flags to every pip invocation in the python hooks
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)