8000 Backport PR #13001: Update windows build instructions by timhoffm · Pull Request #13004 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Backport PR #13001: Update windows build instructions #13004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 13 additions & 26 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_.
There are a few possibilities to build Matplotlib on Windows:

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

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

Set up the conda environment. Note, if you want a qt backend, add ``pyqt`` to
the list of conda packages.

::

# create a new environment with the required packages
conda create -n "matplotlib_build" python=3.5 numpy python-dateutil pyparsing pytz tornado cycler tk libpng zlib freetype
activate matplotlib_build
# if you want a qt backend, you also have to install pyqt (be aware that pyqt doesn't mix well if
# you have created the environment with conda-forge already activated...)
conda install pyqt
# this package is only available in the conda-forge channel
conda install -c conda-forge msinttypes

# copy the libs which have "wrong" names
set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
mkdir lib || cmd /c "exit /b 0"
copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib

# Make the header files and the rest of the static libs available during the build
# CONDA_DEFAULT_ENV is a env variable which is set to the currently active environment path
set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.

# build the wheel
python setup.py bdist_wheel

The `build_alllocal.cmd` script in the root folder automates these steps if
you have already created and activated the conda environment.
conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype msinttypes
conda activate matplotlib_build

For building, call the script ``build_alllocal.cmd`` in the root folder of the
repository::

build_alllocal.cmd


Conda packages
^^^^^^^^^^^^^^
Expand Down
9 changes: 3 additions & 6 deletions build_alllocal.cmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
:: This assumes you have installed all the dependencies via conda packages:
:: # create a new environment with the required packages
:: conda create -n "matplotlib_build" python=3.5 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype
:: activate matplotlib_build
:: if you want qt backend, you also have to install pyqt
:: conda install pyqt
:: # this package is only available in the conda-forge channel
:: conda install -c conda-forge msinttypes
:: # if you want a qt backend, add "pyqt" to the list of conda packages
:: conda create -n "matplotlib_build" python=3.7 numpy python-dateutil pyparsing tornado cycler tk libpng zlib freetype msinttypes
:: conda activate matplotlib_build

set TARGET=bdist_wheel
IF [%1]==[] (
Expand Down
0