Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8672bfb

Browse filesBrowse files
authored
Merge pull request #13662 from meeseeksmachine/auto-backport-of-pr-13064-on-v3.1.x
Backport PR #13064 on branch v3.1.x (Don't explicitly add default include paths to Extensions)
2 parents 090410e + 5ff5d2c commit 8672bfb
Copy full SHA for 8672bfb

File tree

Expand file treeCollapse file tree

12 files changed

+121
-253
lines changed
Filter options
Expand file treeCollapse file tree

12 files changed

+121
-253
lines changed

‎.appveyor.yml

Copy file name to clipboardExpand all lines: .appveyor.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ install:
8484
# and for the wheels
8585
- del %LIBRARY_LIB%\png.lib
8686
- del %LIBRARY_LIB%\z.lib
87-
- set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
8887
# enables the local freetype build
8988
- set MPLLOCALFREETYPE=1
9089
# Show the installed packages + versions
9190
- conda list
9291

9392
test_script:
9493
# Now build the thing..
94+
- set LINK=/LIBPATH:%cd%\lib
9595
- pip install -ve .
9696
# these should show no z, png, or freetype dll...
9797
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"

‎INSTALL.rst

Copy file name to clipboardExpand all lines: INSTALL.rst
+29-4Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,35 @@ etc., you can install the following:
174174

175175
.. note::
176176

177-
Matplotlib depends on non-Python libraries. `pkg-config
178-
<https://www.freedesktop.org/wiki/Software/pkg-config/>`_ can be used
179-
to find required non-Python libraries and thus make the install go more
180-
smoothly if the libraries and headers are not in the expected locations.
177+
Matplotlib depends on non-Python libraries.
178+
179+
On Linux and OSX, pkg-config_ can be used to find required non-Python
180+
libraries and thus make the install go more smoothly if the libraries and
181+
headers are not in the expected locations.
182+
183+
.. _pkg-config: https://www.freedesktop.org/wiki/Software/pkg-config/
184+
185+
If not using pkg-config (in particular on Windows), you may need to set the
186+
include path (to the FreeType, libpng, and zlib headers) and link path (to
187+
the FreeType, libpng, and zlib libraries) explicitly, if they are not in
188+
standard locations. This can be done using standard environment variables
189+
-- on Linux and OSX:
190+
191+
.. code-block:: sh
192+
193+
export CFLAGS='-I/directory/containing/ft2build.h ...'
194+
export LDFLAGS='-L/directory/containing/libfreetype.so ...'
195+
196+
and on Windows:
197+
198+
.. code-block:: bat
199+
200+
set CL=/IC:\directory\containing\ft2build.h ...
201+
set LINK=/LIBPATH:C:\directory\containing\freetype.lib ...
202+
203+
where ``...`` means "also give, in the same format, the directories
204+
containing ``png.h`` and ``zlib.h`` for the include path, and for
205+
``libpng.so``/``png.lib`` and ``libz.so``/``z.lib`` for the link path."
181206

182207
.. note::
183208

‎build_alllocal.cmd

Copy file name to clipboardExpand all lines: build_alllocal.cmd
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,5 @@ mkdir lib || cmd /c "exit /b 0"
2323
copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
2424
copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib
2525

26-
:: Make the header files and the rest of the static libs available during the build
27-
:: CONDA_PREFIX is a env variable which is set to the currently active environment path
28-
set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
29-
3026
:: build the target
3127
python setup.py %TARGET%
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Changes to search paths for FreeType and libpng
2+
```````````````````````````````````````````````
3+
4+
The ``MPLBASEDIRLIST`` environment variables and ``basedirlist`` entry in
5+
``setup.cfg`` have no effect anymore. Instead, if building in situations where
6+
FreeType or libpng are not in the compiler or linker's default path, set the
7+
standard environment variables ``CFLAGS``/``LDFLAGS`` on Linux or OSX, or
8+
``CL``/``LINK`` on Windows, to indicate the relevant paths.
9+
10+
See details in :file:`INSTALL.rst`.

‎setup.cfg.template

Copy file name to clipboardExpand all lines: setup.cfg.template
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33

44
[egg_info]
55

6-
[directories]
7-
# Uncomment to override the default basedir in setupext.py.
8-
# This can be a single directory or a comma-delimited list of directories.
9-
#basedirlist = /usr
10-
116
[test]
127
# If you plan to develop Matplotlib and run or add to the test suite,
138
# set this to True. It will download and build a specific version of

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.