Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 360a2b7

Browse files
anntzertimhoffm
authored andcommitted
Backport PR #13001: Update windows build instructions
1 parent bbb9425 commit 360a2b7

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

INSTALL.rst

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_.
264264
There are a few possibilities to build Matplotlib on Windows:
265265

266266
* Wheels via `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_
267-
* Wheels by using conda packages
268-
* Conda packages
267+
* Wheels by using conda packages (see below)
268+
* Conda packages (see below)
269269

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

277+
Set up the conda environment. Note, if you want a qt backend, add ``pyqt`` to
278+
the list of conda packages.
279+
277280
::
278281

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

304291
Conda packages
305292
^^^^^^^^^^^^^^

build_alllocal.cmd

Lines changed: 3 additions & 6 deletions
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.5 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)