8000 Remove the ``package_data.dlls`` setup.cfg entry. by anntzer · Pull Request #14383 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove the package_data.dlls setup.cfg entry. #14383

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 1 commit into from
Jun 9, 2019
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
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ There are a few possibilities to build Matplotlib on Windows:
* Wheels by using conda packages (see below)
* Conda packages (see below)

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

Wheel builds using conda packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -304,7 +307,6 @@ repository::

build_alllocal.cmd


Conda packages
^^^^^^^^^^^^^^

Expand Down
10 changes: 10 additions & 0 deletions doc/api/next_api_changes/2019-05-30-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Changes to the Matplotlib build
```````````````````````````````

Previously, it was possible to package Windows DLLs into the Maptlotlib
wheel (or sdist) by copying them into the source tree and setting the
``package_data.dlls`` entry in ``setup.cfg``.

DLLs copied in the source tree are now always packaged; the
``package_data.dlls`` entry has no effect anymore. If you do not want to
include the DLLs, don't copy them into the source tree.
6 changes: 0 additions & 6 deletions setup.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,3 @@
# modules. The default is determined by fallback.
#
#backend = Agg

[package_data]
# Package additional files found in the lib/matplotlib directories.
#
# On Windows, package DLL files.
#dlls = True
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
setupext.BackendAgg(),
setupext.BackendTkAgg(),
setupext.BackendMacOSX(),
'Optional package data',
setupext.Dlls(),
]


Expand Down
33 changes: 1 addition & 32 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ def get_package_data(self):
*_pkg_data_helper('matplotlib', 'mpl-data/images'),
*_pkg_data_helper('matplotlib', 'mpl-data/stylelib'),
*_pkg_data_helper('matplotlib', 'backends/web_backend'),
'*.dll', # Only actually matters on Windows.
],
}

Expand Down Expand Up @@ -816,35 +817,3 @@ def get_extension(self):
if platform.python_implementation().lower() == 'pypy':
ext.extra_compile_args.append('-DPYPY=1')
return ext


class OptionalPackageData(OptionalPackage):
config_category = "package_data"


class Dlls(OptionalPackageData):
"""
On Windows, this packages any DLL files that can be found in the
lib/matplotlib/* directories.
"""
name = "dlls"

def check(self):
if sys.platform != 'win32':
raise CheckFailed("Microsoft Windows only")
return super().check()

def get_package_data(self):
return {'': ['*.dll']}

@classmethod
def get_config(cls):
"""
Look at `setup.cfg` and return one of ["auto", True, False] indicating
if the package is at default state ("auto"), forced by the user (True)
or opted-out (False).
"""
try:
return config.getboolean(cls.config_category, cls.name)
except Exception:
return False # <-- default
0