Nix-shell on a python package gives a pip error

Hello,

I’m trying to understand why nix-shell release.nix inside the checkout of one of my Python packages gives me the following error:

$ nix-shell release.nix
warning: ignoring the user-specified setting 'sandbox', because it is a restricted setting and you are not a trusted user
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing setuptools-check-hook
Executing setuptoolsShellHook

Usage:   
  /nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/bin/python3.7 -m pip <command> [options]

no such option: -e
Finished executing setuptoolsShellHook

Trying to understand what’s happening, I’ve traced the code that’s run to the shell source at /pkgs/development/interpreters/python/hooks/setuptools-build-hook.sh from line 23:

setuptoolsShellHook() {
    echo "Executing setuptoolsShellHook"
    runHook preShellHook

    if test -e setup.py; then
        tmp_path=$(mktemp -d)
        export PATH="$tmp_path/bin:$PATH"
        export PYTHONPATH="@pythonSitePackages@:$PYTHONPATH"
        mkdir -p "$tmp_path/@pythonSitePackages@"
        eval "@pythonInterpreter@ -m pip -e . --prefix $tmp_path >&2"
    fi

    runHook postShellHook
    echo "Finished executing setuptoolsShellHook"
}

It appears that the culprit is line #32: eval "@pythonInterpreter@ -m pip -e . --prefix $tmp_path >&2" . From my experience, that line misses a pip command. Can anyone shed a light here? Am I right or am I missing something?

This was fixed with python: Fix invalid pip call in setuptoolsShellHook by seppeljordan · Pull Request #69232 · NixOS/nixpkgs · GitHub

hi @FRidh and thanks, but why it has been merged into a NIXOS:staging branch? is it a new thing or is there a place where I can read about it?

I found this: staging workflow by vcunat · Pull Request #26 · NixOS/rfcs · GitHub that explains part of the rationale… but, that on the linked PR is a change not to a package but to the build system… would that convert into a huge rebuild of packages as well?