3
0
Fork 0
forked from mirrors/nixpkgs

pyslurm: bump to unbreak

Fixes: bd9512f217 ('slurm: 17.02.6 -> 17.02.9 for CVE-2017-15566')
(cherry picked from commit e5aa7467d4)
This commit is contained in:
Dmitry Kalinkin 2018-01-09 02:09:11 -05:00
parent 9708ae00cd
commit 3ebad47b8a
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333
2 changed files with 3 additions and 23 deletions

View file

@ -2,18 +2,16 @@
buildPythonPackage rec {
pname = "pyslurm";
version = "unstable-69e4f4f";
version = "20171102";
name = pname + "-" + version;
src = fetchFromGitHub {
repo = "pyslurm";
owner = "PySlurm";
rev = "69e4f4fd66003b98ddb7da25613fe641d4ae160d";
sha256 = "051kafkndbniklxyf0drb360aiblnqcf9rqjbvmqh66zrfya1m28";
rev = "a2acbc820da419e308c5817998d2abe78a7b75e6";
sha256 = "1wmlx5fh1xzjyksvmq7i083hmyvs7id61ysk2d9hbmf8rza498as";
};
patches = [ ./pyslurm-dlfcn.patch ];
buildInputs = [ cython slurm ];
setupPyBuildFlags = [ "--slurm-lib=${slurm}/lib" "--slurm-inc=${slurm.dev}/include" ];

View file

@ -1,18 +0,0 @@
diff --git a/pyslurm/__init__.py b/pyslurm/__init__.py
index 81643e1..e8b6836 100644
--- a/pyslurm/__init__.py
+++ b/pyslurm/__init__.py
@@ -11,8 +11,11 @@ import sys
old_dlopen_flags = ''
if hasattr(sys, "setdlopenflags"):
old_dlopen_flags = sys.getdlopenflags()
- import DLFCN
- sys.setdlopenflags(old_dlopen_flags | DLFCN.RTLD_GLOBAL)
+ if sys.version_info >= (3,6):
+ from os import RTLD_GLOBAL
+ else:
+ from DLFCN import RTLD_GLOBAL
+ sys.setdlopenflags(old_dlopen_flags | RTLD_GLOBAL)
from .pyslurm import *