@@ -28,6 +28,7 @@ environment:
28
28
- PYTHON_VERSION : " 3.6"
29
29
CONDA_INSTALL_LOCN : " C:\\ Miniconda36-x64"
30
30
TEST_ALL : " no"
31
+ MPLSTATICBUILD : True
31
32
32
33
# We always use a 64-bit machine, but can build x86 distributions
33
34
# with the PYTHON_ARCH variable
@@ -74,17 +75,6 @@ install:
74
75
curl -sL https://github.com/python/cpython/pull/1224.patch |
75
76
patch -fsup 1 -d %CONDA_PREFIX% ) || cmd /c "exit /b 0"
76
77
77
- # Let the install prefer the static builds of the libs
78
- - set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
79
- - mkdir lib || cmd /c "exit /b 0"
80
- - copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
81
- - copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
82
- # These z.lib / png.lib are not static versions but files which end up as
83
- # dependencies to the dll file. This is fine for the conda build, but not here
84
- # and for the wheels
85
- - del %LIBRARY_LIB%\png.lib
86
- - del %LIBRARY_LIB%\z.lib
87
- - set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
88
78
# enables the local freetype build
89
79
- copy ci\travis\setup.cfg .
90
80
# Show the installed packages + versions
@@ -95,9 +85,9 @@ test_script:
95
85
- pip install -ve .
96
86
# these should show no z, png, or freetype dll...
97
87
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
98
- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
99
- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
100
- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
88
+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
89
+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
90
+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
101
91
102
92
# this are optional dependencies so that we don't skip so many tests...
103
93
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
@@ -114,6 +104,7 @@ test_script:
114
104
after_test :
115
105
# After the tests were a success, build wheels with the static libs
116
106
# Hide the output, the copied files really clutter the build log...
107
+ - set MPLSTATICBUILD=True
117
108
- ' python setup.py bdist_wheel > NUL:'
118
109
- dir dist\
119
110
- echo finished...
0 commit comments