From e7c1aa52cc9594fa48622c2048ab69766f3f27d3 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Sat, 21 Jul 2012 00:11:02 +0200 Subject: [PATCH] python: rename eventually created easy_install.pth to pkg-specific file --- pkgs/development/python-modules/generic/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 4e0b6100231..4aa17d28b25 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -20,6 +20,15 @@ , installCommand ? '' easy_install --prefix="$out" . + + # A pth file might have been generated to load the package from + # within its own site-packages, rename this package not to + # collide with others. + eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth + if [ -e "$eapth" ]; then + # move colliding easy_install.pth to specifically named one + mv "$eapth" $(dirname "$eapth")/${name}.pth + fi '' , buildPhase ? "true"