File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383#
8484#backend = Agg
8585#
86+
87+ [package_data]
88+ # Package additional files found in the lib/matplotlib directories.
89+ #
90+ # On Windows, package DLL files.
91+ #dlls = True
Original file line number Diff line number Diff line change 111111 setupext .DviPng (),
112112 setupext .Ghostscript (),
113113 setupext .LaTeX (),
114- setupext .PdfToPs ()
114+ setupext .PdfToPs (),
115+ 'Optional package data' ,
116+ setupext .Dlls (),
115117 ]
116118
117119
Original file line number Diff line number Diff line change @@ -2188,3 +2188,34 @@ def check(self):
21882188 pass
21892189
21902190 raise CheckFailed ()
2191+
2192+
2193+ class OptionalPackageData (OptionalPackage ):
2194+ config_category = "package_data"
2195+
2196+
2197+ class Dlls (OptionalPackageData ):
2198+ """
2199+ On Windows, this packages any DLL files that can be found in the
2200+ lib/matplotlib/* directories.
2201+ """
2202+ name = "dlls"
2203+
2204+ def check_requirements (self ):
2205+ if sys .platform != 'win32' :
2206+ raise CheckFailed ("Microsoft Windows only" )
2207+
2208+ def get_package_data (self ):
2209+ return {'' : ['*.dll' ]}
2210+
2211+ @classmethod
2212+ def get_config (cls ):
2213+ """
2214+ Look at `setup.cfg` and return one of ["auto", True, False] indicating
2215+ if the package is at default state ("auto"), forced by the user (True)
2216+ or opted-out (False).
2217+ """
2218+ try :
2219+ return config .getboolean (cls .config_category , cls .name )
2220+ except :
2221+ return False # <-- default
You can’t perform that action at this time.
0 commit comments