Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5629 from JanSchulz/appveyor2
WIP: more windows build and CI changes
- Loading branch information
Showing
17 changed files
with
392 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,3 +81,5 @@ cover/ | |
# Conda files # | ||
############### | ||
__conda_version__.txt | ||
lib/png.lib | ||
lib/z.lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Building on Windows | ||
|
||
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 | ||
|
||
## Wheel builds using conda packages | ||
|
||
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. | ||
|
||
The commands below assume that you can compile a native python lib for the python version of your | ||
choice. See [this howto](http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/) | ||
how to install and setup such environments. If in doubt: use python 3.5 as it mostly works | ||
without fiddling with environment variables. | ||
|
||
``` sh | ||
# create a new environment with the required packages | ||
conda create -n "matplotlib_build" python=3.4 numpy python-dateutil pyparsing pytz tornado pyqt cycler tk libpng zlib freetype | ||
activate matplotlib_build | ||
# this package is only available in the conda-forge channel | ||
conda install -c conda-forge msinttypes | ||
# for python 2.7 | ||
conda install -c conda-forge functools32 | ||
|
||
# copy the libs which have "wrong" names | ||
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\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_DEFAULT_ENV%\Library\;. | ||
|
||
# build the wheel | ||
python setup.py bdist_wheel | ||
``` | ||
|
||
The `build_alllocal.cmd` script automates these steps if you already created and activated the conda environment. | ||
|
||
|
||
## Conda packages | ||
|
||
This needs a [working installed C compiler](http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/) | ||
for the version of python you are compiling the package for but you don't need to setup the | ||
environment variables. | ||
|
||
```sh | ||
# only the first time... | ||
conda install conda-build | ||
|
||
# the python version you want a package for... | ||
set CONDA_PY=3.5 | ||
|
||
# builds the package, using a clean build environment | ||
conda build ci\conda_recipe | ||
|
||
# install the new package | ||
conda install --use-local matplotlib | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
:: 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.4 numpy python-dateutil pyparsing pytz tornado pyqt cycler tk libpng zlib freetype | ||
:: activate matplotlib_build | ||
:: # this package is only available in the conda-forge channel | ||
:: conda install -c conda-forge msinttypes | ||
:: if you build on py2.7: | ||
:: conda install -c conda-forge functools32 | ||
|
||
set TARGET=bdist_wheel | ||
IF [%1]==[] ( | ||
echo Using default target: %TARGET% | ||
) else ( | ||
set TARGET=%1 | ||
echo Using user supplied target: %TARGET% | ||
) | ||
|
||
IF NOT DEFINED CONDA_DEFAULT_ENV ( | ||
echo No Conda env activated: you need to create a conda env with the right packages and activate it! | ||
GOTO:eof | ||
) | ||
|
||
:: copy the libs which have "wrong" names | ||
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\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_DEFAULT_ENV%\Library\;. | ||
|
||
:: build the target | ||
python setup.py %TARGET% |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.