8000 Merge pull request #14383 from anntzer/package_dlls · matplotlib/matplotlib@29265dc · GitHub
[go: up one dir, main page]

Skip to content

Commit 29265dc

Browse files
authored
Merge pull request #14383 from anntzer/package_dlls
Remove the ``package_data.dlls`` setup.cfg entry.
2 parents 188c0df + f444674 commit 29265dc

File tree

5 files changed

+14
-41
lines changed

5 files changed

+14
-41
lines changed

INSTALL.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ There are a few possibilities to build Matplotlib on Windows:
284284
* Wheels by using conda packages (see below)
285285
* Conda packages (see below)
286286

287+
If you are building your own Matplotlib wheels (or sdists), note that any DLLs
288+
that you copy into the source tree will be packaged too.
289+
287290
Wheel builds using conda packages
288291
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
289292

@@ -304,7 +307,6 @@ repository::
304307

305308
build_alllocal.cmd
306309

307-
308310
Conda packages
309311
^^^^^^^^^^^^^^
310312

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Changes to the Matplotlib build
2+
```````````````````````````````
3+
4+
Previously, it was possible to package Windows DLLs into the Maptlotlib
5+
wheel (or sdist) by copying them into the source tree and setting the
6+
``package_data.dlls`` entry in ``setup.cfg``.
7+
8+
DLLs copied in the source tree are now always packaged; the
9+
``package_data.dlls`` entry has no effect anymore. If you do not want to
10+
include the DLLs, don't copy them into the source tree.

setup.cfg.template

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,3 @@
6666
# modules. The default is determined by fallback.
6767
#
6868
#backend = Agg
69-
70-
[package_data]
71-
# Package additional files found in the lib/matplotlib directories.
72-
#
73-
# On Windows, package DLL files.
74-
#dlls = True

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@
7575
setupext.BackendAgg(),
7676
setupext.BackendTkAgg(),
7777
setupext.BackendMacOSX(),
78-
'Optional package data',
79-
setupext.Dlls(),
8078
]
8179

8280

setupext.py

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ def get_package_data(self):
401401
*_pkg_data_helper('matplotlib', 'mpl-data/images'),
402402
*_pkg_data_helper('matplotlib', 'mpl-data/stylelib'),
403403
*_pkg_data_helper('matplotlib', 'backends/web_backend'),
404+
'*.dll', # Only actually matters on Windows.
404405
],
405406
}
406407

@@ -814,35 +815,3 @@ def get_extension(self):
814815
if platform.python_implementation().lower() == 'pypy':
815816
ext.extra_compile_args.append('-DPYPY=1')
816817
return ext
817-
818-
819-
class OptionalPackageData(OptionalPackage):
820-
config_category = "package_data"
821-
822-
823-
class Dlls(OptionalPackageData):
824-
"""
825-
On Windows, this packages any DLL files that can be found in the
826-
lib/matplotlib/* directories.
827-
"""
828-
name = "dlls"
829-
830-
def check(self):
831-
if sys.platform != 'win32':
832-
raise CheckFailed("Microsoft Windows only")
833-
return super().check()
834-
835-
def get_package_data(self):
836-
return {'': ['*.dll']}
837-
838-
@classmethod
839-
def get_config(cls):
840-
"""
841-
Look at `setup.cfg` and return one of ["auto", True, False] indicating
842-
if the package is at default state ("auto"), forced by the user (True)
843-
or opted-out (False).
844-
"""
845-
try:
846-
return config.getboolean(cls.config_category, cls.name)
847-
except Exception:
848-
return False # <-- default

0 commit comments

Comments
 (0)
0