about summary refs log tree commit diff
path: root/pkgs/development/python-modules/generic
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-06-19 12:33:04 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-06-19 12:33:04 +0200
commite75740455546f85cbf9849907b1f6520fdb487d8 (patch)
tree02ab162a81b88bcf1e116b6cbb180557c33ba9b9 /pkgs/development/python-modules/generic
parenta02e5ad9263e508b4df6a3e5841e95bace0e787b (diff)
parent410aad942fc82bbeb9c30a4fdf826ed33998a593 (diff)
Merge branch 'master' into staging
Hydra nixpkgs: ?compare=1279790
Diffstat (limited to 'pkgs/development/python-modules/generic')
-rw-r--r--pkgs/development/python-modules/generic/catch_conflicts.py2
-rw-r--r--pkgs/development/python-modules/generic/default.nix5
2 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/generic/catch_conflicts.py b/pkgs/development/python-modules/generic/catch_conflicts.py
index 35512bb44d358..bb82900c65a92 100644
--- a/pkgs/development/python-modules/generic/catch_conflicts.py
+++ b/pkgs/development/python-modules/generic/catch_conflicts.py
@@ -9,7 +9,7 @@ for f in sys.path:
     for req in pkg_resources.find_distributions(f):
         if req not in packages[req.project_name]:
             # some exceptions inside buildPythonPackage
-            if req.project_name in ['setuptools', 'pip']:
+            if req.project_name in ['setuptools', 'pip', 'wheel']:
                 continue
             packages[req.project_name].append(req)
 
diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix
index 7221bac320c9c..38d74e0824459 100644
--- a/pkgs/development/python-modules/generic/default.nix
+++ b/pkgs/development/python-modules/generic/default.nix
@@ -42,6 +42,9 @@
 # Additional flags to pass to "pip install".
 , installFlags ? []
 
+# Raise an error if two packages are installed with the same name
+, catchConflicts ? true
+
 , format ? "setup"
 
 , ... } @ attrs:
@@ -141,7 +144,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
 
   postFixup = attrs.postFixup or ''
     wrapPythonPrograms
-
+  '' + lib.optionalString catchConflicts ''
     # check if we have two packages with the same name in closure and fail
     # this shouldn't happen, something went wrong with dependencies specs
     ${python.interpreter} ${./catch_conflicts.py}