3
3
4
4
from auditwheel import policy
5
5
6
-
7
- def add_zlib_versions ():
8
- with open (join (dirname (abspath (policy .__file__ )), "manylinux-policy.json" ), 'r' ) as manylinux_policy :
9
- manylinux_policy_lines = manylinux_policy .readlines ()
10
-
11
- manylinux_policy_data = ""
12
- for line in manylinux_policy_lines :
13
- if "ZLIB" in line :
14
- if len (line ) > 22 :
15
- updated_line = line [:- 2 ] + ', "1.2.9", "1.2.12", "1.2.13"]'
16
- else :
17
- updated_line = line [:- 2 ] + '"1.2.9", "1.2.12", "1.2.13"]'
18
- print ("auditwheel patch: replace policy line \" %s\" with \" %s\" " % (line , updated_line ))
19
- manylinux_policy_replacement = line .replace (line , updated_line )
20
- else :
21
- manylinux_policy_replacement = line
22
- manylinux_policy_data = manylinux_policy_data + manylinux_policy_replacement
23
-
24
- with open (join (dirname (abspath (policy .__file__ )), "manylinux-policy.json" ), 'w' ) as manylinux_final_policy :
25
- manylinux_final_policy .write (manylinux_policy_data )
26
-
27
6
def add_whitelisted_libs ():
28
7
policies = None
29
8
@@ -36,7 +15,5 @@ def add_whitelisted_libs():
36
15
with open (join (dirname (abspath (policy .__file__ )), "manylinux-policy.json" ), "w" ) as f :
37
16
f .write (json .dumps (policies ))
38
17
39
-
40
18
if __name__ == '__main__' :
41
- add_zlib_versions ()
42
19
add_whitelisted_libs ()
0 commit comments