diff options
Diffstat (limited to 'pkgs/development/python-modules/generic')
-rw-r--r-- | pkgs/development/python-modules/generic/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/python-modules/generic/wrap.sh | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 20fb2ec496b..b962e9f8472 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -62,10 +62,10 @@ if disabled then throw "${name} not supported for interpreter ${python.executabl ] ++ buildInputs ++ pythonPath ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name or "") unzip); - # propagate python to active setup-hook in nix-shell - propagatedBuildInputs = propagatedBuildInputs ++ [ recursivePthLoader python ]; + # propagate python/setuptools to active setup-hook in nix-shell + propagatedBuildInputs = propagatedBuildInputs ++ [ recursivePthLoader python setuptools ]; - pythonPath = [ setuptools ] ++ pythonPath; + pythonPath = pythonPath; configurePhase = attrs.configurePhase or '' runHook preConfigure diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index e343536b8fa..220ddf26b30 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -26,12 +26,7 @@ wrapPythonProgramsIn() { # dont wrap EGG-INFO scripts since they are called from python if echo "$i" | grep -v EGG-INFO/scripts; then echo "wrapping \`$i'..." - sed -i "$i" -re '1 { - /^#!/!b; :r - /\\$/{N;b r} - /__future__|^ *(#.*)?$/{n;b r} - /^ *[^# ]/i import sys; sys.argv[0] = '"'$(basename "$i")'"' - }' + sed -i "$i" -re '@magicalSedExpression@' wrapProgram "$i" \ --prefix PYTHONPATH ":" $program_PYTHONPATH \ --prefix PATH ":" $program_PATH |