@@ -23,6 +23,26 @@ def run(wheel_directory):
23
23
"-Csetup-args=-Dsystem-freetype=True" )
24
24
25
25
wheel_location = glob .glob (os .path .join ("dist" , "matplotlib-*.whl" ))[0 ]
26
+
27
+ os .environ ["PATH" ] = (os .path .dirname (__np__ .find_build_tool_exe ("7zip" , "7z.exe" )) + os .path .pathsep +
28
+ os .path .dirname (__np__ .find_build_tool_exe ("mingw" , "objdump.exe" )) + os .path .pathsep + os .environ ["PATH" ])
29
+ wheel_files = []
30
+ with TemporaryDirectory () as tmpdir :
31
+ with WheelFile (wheel_location ) as wf :
32
+ for filename in wf .namelist ():
33
+ wheel_files .append (filename )
34
+ wf .extract (filename , tmpdir )
35
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ _c_internal_utils.lib" ), "matplotlib__c_internal_utils_" , [".*fflush.*" ])
36
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ _image.lib" ), "matplotlib__image_" , [".*fflush.*" ])
37
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ _path.lib" ), "matplotlib__path_" , [".*fflush.*" ])
38
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ _qhull.lib" ), "matplotlib__qhull_" , [".*fflush.*" ])
39
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ _tkagg.lib" ), "matplotlib__tkagg_" , [".*fflush.*" ])
40
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ _tri.lib" ), "matplotlib__tri_" , [".*fflush.*" ])
41
+ __np__ .rename_symbols_in_file (os .path .join (tmpdir , "matplotlib\\ ft2font.lib" ), "matplotlib_ft2font_" , [".*fflush.*" ])
42
+ with WheelFile (wheel_location , 'w' ) as wf :
43
+ for filename in wheel_files :
44
+ wf .write (os .path .join (tmpdir , filename ), filename )
45
+
26
46
wheel_name = os .path .basename (wheel_location )
27
47
shutil .copy (wheel_location , os .path .join (wheel_directory , wheel_name ))
28
48
return os .path .join (wheel_directory , wheel_name )
0 commit comments