Skip to content

Commit 93b5c0f

Browse files
committed
Move setup.cfg to mplsetup.cfg.
... in order to avoid having to jump through hoops to work around the fact that distutils/setuptools also intend to use setup.cfg just for themselves.
1 parent ca275dc commit 93b5c0f

File tree

13 files changed

+34
-39
lines changed

13 files changed

+34
-39
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ jobs:
6060
CIBW_BUILD: "cp37-* cp38-*"
6161
CIBW_ARCHS: aarch64
6262

63-
- name: Copy setup.cfg to configure wheel
64-
run: |
65-
cp setup.cfg.template setup.cfg
66-
6763
- name: Build wheels for CPython 3.9
6864
run: |
6965
python -m cibuildwheel --output-dir dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dist
4141
pip-wheel-metadata/*
4242
# tox testing tool
4343
.tox
44-
setup.cfg
44+
mplsetup.cfg
4545
# generated by setuptools_scm
4646
lib/matplotlib/_version.py
4747

ci/check_wheel_licenses.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
included.
66
77
To run:
8-
$ cp setup.cfg.template setup.cfg
98
$ python3 setup.py bdist_wheel
109
$ ./ci/check_wheel_licenses.py
1110
"""
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Matplotlib-specific build options have moved from ``setup.cfg`` to ``mplsetup.cfg``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... in order to avoid conflicting with the use of :file:`setup.cfg` by
4+
``setuptools``.
5+
6+
Note that the path to this configuration file can still be set via the
7+
:envvar:`MPLSETUPCFG` environment variable, which allows one to keep using the
8+
same file before and after this change.

doc/devel/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ rasterize characters differently) and of Qhull. As an exception, Matplotlib
104104
defaults to the system version of FreeType on AIX.
105105

106106
To force Matplotlib to use a copy of FreeType or Qhull already installed in
107-
your system, create a :file:`setup.cfg` file with the following contents:
107+
your system, create a :file:`mplsetup.cfg` file with the following contents:
108108

109109
.. code-block:: cfg
110110

doc/faq/environment_variables_faq.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Environment variables
2929

3030
.. envvar:: MPLSETUPCFG
3131

32-
This optional variable can be set to the full path of a :file:`setup.cfg`
32+
This optional variable can be set to the full path of a :file:`mplsetup.cfg`
3333
configuration file used to customize the Matplotlib build. By default, a
34-
:file:`setup.cfg` file in the root of the Matplotlib source tree will be
35-
read. Supported build options are listed in :file:`setup.cfg.template`.
34+
:file:`mplsetup.cfg` file in the root of the Matplotlib source tree will be
35+
read. Supported build options are listed in :file:`mplsetup.cfg.template`.
3636

3737
.. envvar:: PATH
3838

doc/users/installing_source.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ docs.
6565
If you would like to build from a tarball, grab the latest *tar.gz* release
6666
file from `the PyPI files page <https://pypi.org/project/matplotlib/>`_.
6767

68-
We provide a `setup.cfg`_ file which you can use to customize the build
68+
We provide a `mplsetup.cfg`_ file which you can use to customize the build
6969
process. For example, which default backend to use, whether some of the
7070
optional libraries that Matplotlib ships with are installed, and so on. This
7171
file will be particularly useful to those packaging Matplotlib.
7272

73-
.. _setup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template
73+
.. _mplsetup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/master/mplsetup.cfg.template
7474

7575
If you are building your own Matplotlib wheels (or sdists) on Windows, note
7676
that any DLLs that you copy into the source tree will be packaged too.

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ def _init_tests():
12041204
_log.warning(
12051205
f"Matplotlib is not built with the correct FreeType version to "
12061206
f"run tests. Rebuild without setting system_freetype=1 in "
1207-
f"setup.cfg. Expect many image comparison failures below. "
1207+
f"mplsetup.cfg. Expect many image comparison failures below. "
12081208
f"Expected freetype version {LOCAL_FREETYPE_VERSION}. "
12091209
f"Found freetype version {ft2font.__freetype_version__}. "
12101210
"Freetype build type is {}local".format(

setup.cfg.template renamed to mplsetup.cfg.template

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# Rename this file to setup.cfg to modify Matplotlib's build options.
2-
3-
[metadata]
4-
license_files = LICENSE/*
5-
6-
[egg_info]
1+
# Rename this file to mplsetup.cfg to modify Matplotlib's build options.
72

83
[libs]
94
# By default, Matplotlib builds with LTO, which may be slow if you re-compile

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# NOTE: Matplotlib-specific configuration options have been moved to
2+
# mplsetup.cfg.template.
3+
4+
[metadata]
5+
license_files = LICENSE/*

0 commit comments

Comments
 (0)