Skip to content

Commit f1b703a

Browse files
committed
Always include sample_data in installs.
The whole sample data folder is ~500K now, which is much less than many compiled extension modules (backend_agg, ft2font, _image, _path, _qhull shared objects all weight ~2-3M). Always installing sample_data is a step towards making Matplotlib installs more homogeneous (i.e., fewer variants).
1 parent b6294ff commit f1b703a

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

setup.cfg.template

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ license_files = LICENSE/*
2121
# considered optional. All except 'tests' data (meaning the baseline
2222
# image files) are installed by default, but that can be changed here.
2323
#tests = False
24-
#sample_data = True
2524

2625
[gui_support]
2726
# Matplotlib supports multiple GUI toolkits, known as backends.

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
setupext.Platform(),
6262
setupext.FreeType(),
6363
setupext.Qhull(),
64-
setupext.SampleData(),
6564
setupext.Tests(),
6665
setupext.BackendMacOSX(),
6766
]

setupext.py

+1-18
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,7 @@ def get_package_data(self):
365365
return {
366366
'matplotlib': [
367367
'mpl-data/matplotlibrc',
368-
*_pkg_data_helper('matplotlib', 'mpl-data/fonts'),
369-
*_pkg_data_helper('matplotlib', 'mpl-data/images'),
370-
*_pkg_data_helper('matplotlib', 'mpl-data/stylelib'),
368+
*_pkg_data_helper('matplotlib', 'mpl-data'),
371369
*_pkg_data_helper('matplotlib', 'backends/web_backend'),
372370
'*.dll', # Only actually matters on Windows.
373371
],
@@ -479,21 +477,6 @@ def get_extensions(self):
479477
yield ext
480478

481479

482-
class SampleData(OptionalPackage):
483-
"""
484-
This handles the sample data that ships with matplotlib. It is
485-
technically optional, though most often will be desired.
486-
"""
487-
name = "sample_data"
488-
489-
def get_package_data(self):
490-
return {
491-
'matplotlib': [
492-
*_pkg_data_helper('matplotlib', 'mpl-data/sample_data'),
493-
],
494-
}
495-
496-
497480
class Tests(OptionalPackage):
498481
name = "tests"
499482
default_config = False

0 commit comments

Comments
 (0)