Author: chaoflow
Date: Sun Feb 26 17:23:35 2012
New Revision: 32591
URL: https://nixos.org/websvn/nix/?rev=32591&sc=1
Log:
removal of deps' scripts only if easy-install.pth exists
solves duplicate installation for packages that do not use setuptools
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/python-modules/generic/default.nix
Modified:
nixpkgs/branches/stdenv-updates/pkgs/development/python-modules/generic/default.nix
==============================================================================
---
nixpkgs/branches/stdenv-updates/pkgs/development/python-modules/generic/default.nix
Sun Feb 26 17:23:31 2012 (r32590)
+++
nixpkgs/branches/stdenv-updates/pkgs/development/python-modules/generic/default.nix
Sun Feb 26 17:23:35 2012 (r32591)
@@ -28,15 +28,19 @@
# install the current package with easy_install.pth including
dependencies
python setup.py install --prefix="$out"
- # remove console_scripts again, because they were created for deps, too
- rm -Rf "$out"/bin
+ # plain distutils knows no dependencies
+ eapth="$out"/lib/${python.libPrefix}/site-packages/easy-install.pth
+ if [ -e "$eapth" ]; then
+ # remove console_scripts again, because they were created for deps,
too
+ rm -Rf "$out"/bin
- # run easy_install to generate scripts for the current package,
- # it won't reinstall
- easy_install --prefix="$out" .
+ # run easy_install to generate scripts for the current package,
+ # it won't reinstall
+ easy_install --prefix="$out" .
- # move colliding easy_install.pth to specifically named one
- mv
"$out/lib/${python.libPrefix}/site-packages/"{easy-install.pth,${name}.pth}
+ # move colliding easy_install.pth to specifically named one
+ mv "$eapth" $(dirname "$eapth")/${name}.pth
+ fi
# These cause collisions and our output is not a site anyway
# If you need a site, install python-site
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits