Skip to content

Commit 182751b

Browse files
committed
Update windows build instructions
1 parent dba2d7b commit 182751b

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

INSTALL.rst

+13-26
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_.
262262
There are a few possibilities to build Matplotlib on Windows:
263263

264264
* Wheels via `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_
265-
* Wheels by using conda packages
266-
* Conda packages
265+
* Wheels by using conda packages (see below)
266+
* Conda packages (see below)
267267

268268
Wheel builds using conda packages
269269
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -272,32 +272,19 @@ This is a wheel build, but we use conda packages to get all the requirements.
272272
The binary requirements (png, FreeType,...) are statically linked and therefore
273273
not needed during the wheel install.
274274

275+
Set up the conda environment. Note, if you want a qt backend, add ``pyqt`` to
276+
the list of conda packages.
277+
275278
::
276279

277-
# create a new environment with the required packages
278-
conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing pytz tornado cycler tk libpng zlib freetype
279-
activate matplotlib_build
280-
# if you want a qt backend, you also have to install pyqt (be aware that pyqt doesn't mix well if
281-
# you have created the environment with conda-forge already activated...)
282-
conda install pyqt
283-
# this package is only available in the conda-forge channel
284-
conda install -c conda-forge msinttypes
285-
286-
# copy the libs which have "wrong" names
287-
set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
288-
mkdir lib || cmd /c "exit /b 0"
289-
copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
290-
copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib
291-
292-
# Make the header files and the rest of the static libs available during the build
293-
# CONDA_DEFAULT_ENV is a env variable which is set to the currently active environment path
294-
set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
295-
296-
# build the wheel
297-
python setup.py bdist_wheel
298-
299-
The `build_alllocal.cmd` script in the root folder automates these steps if
300-
you have already created and activated the conda environment.
280+
conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype msinttypes
281+
conda activate matplotlib_build
282+
283+
For building, call the script ``build_alllocal.cmd`` in the root folder of the
284+
repository::
285+
286+
build_alllocal.cmd
287+
301288

302289
Conda packages
303290
^^^^^^^^^^^^^^

build_alllocal.cmd

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
:: This assumes you have installed all the dependencies via conda packages:
22
:: # create a new environment with the required packages
3-
:: conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype
4-
:: activate matplotlib_build
5-
:: if you want qt backend, you also have to install pyqt
6-
:: conda install pyqt
7-
:: # this package is only available in the conda-forge channel
8-
:: conda install -c conda-forge msinttypes
3+
:: # if you want a qt backend, add "pyqt" to the list of conda packages
4+
:: conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype msinttypes
5+
:: conda activate matplotlib_build
96

107
set TARGET=bdist_wheel
118
IF [%1]==[] (

0 commit comments

Comments
 (0)