about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pysnmp
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2019-11-01 18:51:46 +0100
committerMichael Weiss <dev.primeos@gmail.com>2019-11-01 18:55:37 +0100
commitd917e00b55525572c5f200563143401b3e8db18c (patch)
treef6210e9eac861b25098f6ec20c742405967fb34d /pkgs/development/python-modules/pysnmp
parent26c229376237e6c34f7311b5d89fa83ce23a2031 (diff)
python3Packages.pysnmp: Fix the build
The build did most likely break due to 501314c9e8b.
Diffstat (limited to 'pkgs/development/python-modules/pysnmp')
-rw-r--r--pkgs/development/python-modules/pysnmp/default.nix2
-rw-r--r--pkgs/development/python-modules/pysnmp/setup.py-Fix-the-setuptools-version-check.patch27
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pysnmp/default.nix b/pkgs/development/python-modules/pysnmp/default.nix
index 81172787b65ab..e40271289935f 100644
--- a/pkgs/development/python-modules/pysnmp/default.nix
+++ b/pkgs/development/python-modules/pysnmp/default.nix
@@ -15,6 +15,8 @@ buildPythonPackage rec {
     sha256 = "1acbfvpbr45i137s00mbhh21p71ywjfw3r8z0ybcmjjqz7rbwg8c";
   };
 
+  patches = [ ./setup.py-Fix-the-setuptools-version-check.patch ];
+
   # NameError: name 'mibBuilder' is not defined
   doCheck = false;
 
diff --git a/pkgs/development/python-modules/pysnmp/setup.py-Fix-the-setuptools-version-check.patch b/pkgs/development/python-modules/pysnmp/setup.py-Fix-the-setuptools-version-check.patch
new file mode 100644
index 0000000000000..784ddd3f34275
--- /dev/null
+++ b/pkgs/development/python-modules/pysnmp/setup.py-Fix-the-setuptools-version-check.patch
@@ -0,0 +1,27 @@
+From 5f843f7c8554e2feab7f57d8718231408196fd80 Mon Sep 17 00:00:00 2001
+From: Michael Weiss <dev.primeos@gmail.com>
+Date: Fri, 1 Nov 2019 18:47:14 +0100
+Subject: [PATCH] setup.py: Fix the setuptools version check
+
+This broke the Nix build after setuptools.__version__ changed from
+"41.2.0" to "41.4.0.post20191022".
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 0d987d5c..4f625d7c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -63,7 +63,7 @@ try:
+ 
+     setup, Command = setuptools.setup, setuptools.Command
+ 
+-    observed_version = [int(x) for x in setuptools.__version__.split('.')]
++    observed_version = [int(x) for x in setuptools.__version__.split('.')[0:3]]
+     required_version = [36, 2, 0]
+ 
+     # NOTE(etingof): require fresh setuptools to build proper wheels
+-- 
+2.23.0
+