@@ -43,6 +43,7 @@ environment:
43
43
CONDA_NPY : " 111"
44
44
CONDA_INSTALL_LOCN : " C:\\ Miniconda36-x64"
45
45
TEST_ALL : " no"
46
+ MPLSTATICBUILD : True
46
47
47
48
# We always use a 64-bit machine, but can build x86 distributions
48
49
# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
@@ -99,17 +100,6 @@ install:
99
100
curl -sL https://github.com/python/cpython/pull/1224.patch |
100
101
patch -fsup 1 -d %CONDA_PREFIX% ) || ( set errorlevel= )
101
102
102
- # Let the install prefer the static builds of the libs
103
- - set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
104
- - mkdir lib || cmd /c "exit /b 0"
105
- - copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
106
- - copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
107
- # These z.lib / png.lib are not static versions but files which end up as
108
- # dependencies to the dll file. This is fine for the conda build, but not here
109
- # and for the wheels
110
- - del %LIBRARY_LIB%\png.lib
111
- - del %LIBRARY_LIB%\z.lib
112
- - set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
113
103
# enables the local freetype build
114
104
- copy ci\travis\setup.cfg .
115
105
# Show the installed packages + versions
@@ -120,9 +110,9 @@ test_script:
120
110
- ' %CMD_IN_ENV% pip install -ve .'
121
111
# these should show no z, png, or freetype dll...
122
112
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
123
- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
124
- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
125
- - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
113
+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
114
+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
115
+ - ' if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
126
116
127
117
# this are optional dependencies so that we don't skip so many tests...
128
118
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
@@ -144,15 +134,14 @@ after_test:
144
134
# After the tests were a success, build packages (wheels and conda)
145
135
146
136
# Build the wheel with the static libs
137
+ - set MPLSTATICBUILD=True
147
138
# Hide the output, the copied files really clutter the build log...
148
139
- ' %CMD_IN_ENV% python setup.py bdist_wheel > NUL:'
149
140
150
141
# And now the conda build after a cleanup...
151
142
# cleanup build files so that they don't pollute the conda build but keep the wheel in dist...
143
+ - set MPLSTATICBUILD=
152
144
- git clean -xdfq -e dist/
153
- # cleanup the environment so that the test-environment does not leak into the conda build...
154
- - set MPLBASEDIRLIST=
155
- - set LIBRARY_LIB=
156
145
- deactivate
157
146
- path
158
147
- where python
0 commit comments