tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python3Packages.oslo-utils: 7.3.0 -> 8.0.0
Martin Weinelt
1 year ago
c7a4c331
1d97f8c4
+35
-2
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
oslo-utils
ctypes.patch
default.nix
+22
pkgs/development/python-modules/oslo-utils/ctypes.patch
reviewed
···
1
1
+
diff --git a/oslo_utils/secretutils.py b/oslo_utils/secretutils.py
2
2
+
index 3183865..83e00e8 100644
3
3
+
--- a/oslo_utils/secretutils.py
4
4
+
+++ b/oslo_utils/secretutils.py
5
5
+
@@ -46,13 +46,10 @@ def md5(string=b'', usedforsecurity=True):
6
6
+
return hashlib.md5(string, usedforsecurity=usedforsecurity) # nosec
7
7
+
8
8
+
9
9
+
-if ctypes.util.find_library("crypt"):
10
10
+
- _libcrypt = ctypes.CDLL(ctypes.util.find_library("crypt"), use_errno=True)
11
11
+
- _crypt = _libcrypt.crypt
12
12
+
- _crypt.argtypes = (ctypes.c_char_p, ctypes.c_char_p)
13
13
+
- _crypt.restype = ctypes.c_char_p
14
14
+
-else:
15
15
+
- _crypt = None
16
16
+
+_libcrypt = ctypes.CDLL("@crypt@", use_errno=True)
17
17
+
+_crypt = _libcrypt.crypt
18
18
+
+_crypt.argtypes = (ctypes.c_char_p, ctypes.c_char_p)
19
19
+
+_crypt.restype = ctypes.c_char_p
20
20
+
21
21
+
22
22
+
def crypt_mksalt(method):
+13
-2
pkgs/development/python-modules/oslo-utils/default.nix
reviewed
···
7
7
eventlet,
8
8
fixtures,
9
9
iso8601,
10
10
+
libxcrypt-legacy,
10
11
netaddr,
11
12
netifaces,
12
13
oslo-i18n,
13
14
oslotest,
14
15
packaging,
15
16
pbr,
17
17
+
psutil,
16
18
pyparsing,
17
19
pytz,
18
20
qemu-utils,
21
21
+
replaceVars,
19
22
setuptools,
23
23
+
stdenv,
20
24
stestr,
21
25
testscenarios,
22
26
tzdata,
···
27
31
28
32
buildPythonPackage rec {
29
33
pname = "oslo-utils";
30
30
-
version = "7.3.0";
34
34
+
version = "8.0.0";
31
35
pyproject = true;
32
36
33
37
src = fetchPypi {
34
38
pname = "oslo.utils";
35
39
inherit version;
36
36
-
hash = "sha256-WaXT5Oe7x42AHM68K4I+QptiTBK7bjtudvccKfK/Id8=";
40
40
+
hash = "sha256-kG/PHIb2cfIkwZJbKo03WgU5FD+2FYsT4gKnndjmxpQ=";
37
41
};
38
42
43
43
+
patches = [
44
44
+
(replaceVars ./ctypes.patch {
45
45
+
crypt = "${lib.getLib libxcrypt-legacy}/lib/libcrypt${stdenv.hostPlatform.extensions.sharedLibrary}";
46
46
+
})
47
47
+
];
48
48
+
39
49
postPatch = ''
40
50
# only a small portion of the listed packages are actually needed for running the tests
41
51
# so instead of removing them one by one remove everything
···
54
64
netifaces
55
65
oslo-i18n
56
66
packaging
67
67
+
psutil
57
68
pyparsing
58
69
pytz
59
70
tzdata