@@ -26,6 +26,7 @@ class PyMatplotlib(PythonPackage):
2626
2727 license ("Apache-2.0" )
2828
29+ version ("3.8.4" , sha256 = "8aac397d5e9ec158960e31c381c5ffc52ddd52bd9a47717e2a694038167dffea" )
2930 version ("3.8.3" , sha256 = "7b416239e9ae38be54b028abbf9048aff5054a9aba5416bef0bd17f9162ce161" )
3031 version ("3.8.2" , sha256 = "01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1" )
3132 version ("3.8.1" , sha256 = "044df81c1f6f3a8e52d70c4cfcb44e77ea9632a10929932870dfaa90de94365d" )
@@ -61,14 +62,38 @@ class PyMatplotlib(PythonPackage):
6162 version ("3.1.0" , sha256 = "1e0213f87cc0076f7b0c4c251d7e23601e2419cd98691df79edb95517ba06f0c" )
6263 version ("3.0.2" , sha256 = "c94b792af431f6adb6859eb218137acd9a35f4f7442cea57e4a59c54751c36af" )
6364 version ("3.0.0" , sha256 = "b4e2333c98a7c2c1ff6eb930cd2b57d4b818de5437c5048802096b32f66e65f9" )
64- version ("2.2.5" , sha256 = "a3037a840cd9dfdc2df9fee8af8f76ca82bfab173c0f9468193ca7a89a2b60ea" )
65- version ("2.2.4" , sha256 = "029620799e581802961ac1dcff5cb5d3ee2f602e0db9c0f202a90495b37d2126" )
66- version ("2.2.3" , sha256 = "7355bf757ecacd5f0ac9dd9523c8e1a1103faadf8d33c22664178e17533f8ce5" )
67- version ("2.2.2" , sha256 = "4dc7ef528aad21f22be85e95725234c5178c0f938e2228ca76640e5e84d8cde8" )
68- version ("2.0.2" , sha256 = "0ffbc44faa34a8b1704bc108c451ecf87988f900ef7ce757b8e2e84383121ff1" )
69- version ("2.0.0" , sha256 = "36cf0985829c1ab2b8b1dae5e2272e53ae681bf33ab8bedceed4f0565af5f813" )
65+ version (
66+ "2.2.5" ,
67+ sha256 = "a3037a840cd9dfdc2df9fee8af8f76ca82bfab173c0f9468193ca7a89a2b60ea" ,
68+ deprecated = True ,
69+ )
70+ version (
71+ "2.2.4" ,
72+ sha256 = "029620799e581802961ac1dcff5cb5d3ee2f602e0db9c0f202a90495b37d2126" ,
73+ deprecated = True ,
74+ )
75+ version (
76+ "2.2.3" ,
77+ sha256 = "7355bf757ecacd5f0ac9dd9523c8e1a1103faadf8d33c22664178e17533f8ce5" ,
78+ deprecated = True ,
79+ )
80+ version (
81+ "2.2.2" ,
82+ sha256 = "4dc7ef528aad21f22be85e95725234c5178c0f938e2228ca76640e5e84d8cde8" ,
83+ deprecated = True ,
84+ )
85+ version (
86+ "2.0.2" ,
87+ sha256 = "0ffbc44faa34a8b1704bc108c451ecf87988f900ef7ce757b8e2e84383121ff1" ,
88+ deprecated = True ,
89+ )
90+ version (
91+ "2.0.0" ,
92+ sha256 = "36cf0985829c1ab2b8b1dae5e2272e53ae681bf33ab8bedceed4f0565af5f813" ,
93+ deprecated = True ,
94+ )
7095
71- # https://matplotlib.org/tutorials/introductory/usage .html#backends
96+ # https://matplotlib.org/stable/users/explain/figure/backends .html
7297 # From `lib/matplotlib/rcsetup.py`:
7398 interactive_bk = [
7499 # GTK
@@ -133,7 +158,7 @@ class PyMatplotlib(PythonPackage):
133158 variant ("latex" , default = False , description = "Enable LaTeX text rendering support" )
134159 variant ("fonts" , default = False , description = "Enable support for system font detection" )
135160
136- # https://matplotlib.org/stable/devel /dependencies.html
161+ # https://matplotlib.org/stable/users/installing /dependencies.html
137162 # Runtime dependencies
138163 # Mandatory dependencies
139164 depends_on (
"[email protected] :" ,
when = "@3.8:" ,
type = (
"build" ,
"link" ,
"run" ))
@@ -144,13 +169,14 @@ class PyMatplotlib(PythonPackage):
144169 depends_on (
"[email protected] :" ,
when = "@3.5:" ,
type = (
"build" ,
"run" ))
145170 depends_on (
"[email protected] :" ,
when = "@3.8.1:" ,
type = (
"build" ,
"run" ))
146171 depends_on (
"[email protected] :" ,
when = "@2.2:" ,
type = (
"build" ,
"run" ))
147- depends_on (
"[email protected] :1" ,
when = "@3.8:" ,
type = (
"build" ,
"link" ,
"run" ))
148- depends_on (
"[email protected] :" ,
when = "@3.7:" ,
type = (
"build" ,
"link" ,
"run" ))
149- depends_on (
"[email protected] :" ,
when = "@3.6:" ,
type = (
"build" ,
"link" ,
"run" ))
150- depends_on (
"[email protected] :" ,
when = "@3.5:" ,
type = (
"build" ,
"link" ,
"run" ))
151- depends_on (
"[email protected] :" ,
when = "@3.4:" ,
type = (
"build" ,
"link" ,
"run" ))
152- depends_on (
"[email protected] :" ,
when = "@3.3:" ,
type = (
"build" ,
"link" ,
"run" ))
153- depends_on (
"[email protected] :" ,
type = (
"build" ,
"run" ))
172+ depends_on (
"[email protected] :" ,
when = "@3.8.4:" ,
type = (
"build" ,
"link" ,
"run" ))
173+ depends_on (
"[email protected] :1" ,
when = "@3.8.0:3.8.3" ,
type = (
"build" ,
"link" ,
"run" ))
174+ depends_on (
"[email protected] :1" ,
when = "@3.7" ,
type = (
"build" ,
"link" ,
"run" ))
175+ depends_on (
"[email protected] :1" ,
when = "@3.6" ,
type = (
"build" ,
"link" ,
"run" ))
176+ depends_on (
"[email protected] :1" ,
when = "@3.5" ,
type = (
"build" ,
"link" ,
"run" ))
177+ depends_on (
"[email protected] :1" ,
when = "@3.4" ,
type = (
"build" ,
"link" ,
"run" ))
178+ depends_on (
"[email protected] :1" ,
when = "@3.3" ,
type = (
"build" ,
"link" ,
"run" ))
179+ depends_on (
"[email protected] :1" ,
when = "@:3.2" ,
type = (
"build" ,
"run" ))
154180 depends_on ("py-packaging@20:" , when = "@3.6:" , type = ("build" , "run" ))
155181 depends_on ("py-packaging" , when = "@3.5:" , type = ("build" , "run" ))
156182 depends_on ("pil@8:" , when = "@3.8.1:" , type = ("build" , "run" ))
@@ -166,7 +192,6 @@ class PyMatplotlib(PythonPackage):
166192 # Historical dependencies
167193 depends_on ("py-pytz" , type = ("build" , "run" ), when = "@:2" )
168194 depends_on (
"[email protected] :" ,
type = (
"build" ,
"run" ),
when = "@2" )
169- depends_on (
"[email protected] :" ,
type = (
"build" ,
"run" ),
when = "@:1" )
170195
171196 # Optional dependencies
172197 # Backends
@@ -219,7 +244,7 @@ class PyMatplotlib(PythonPackage):
219244 depends_on ("pkgconfig" , type = "build" )
220245
221246 # C libraries
222- depends_on (
"[email protected] :" ) # freetype 2.6.1 needed for tests to pass 247+ depends_on (
"[email protected] : build_system=autotools" ) 223248 depends_on (
"[email protected] :" ,
when = "@3.4:" )
224249 # starting from qhull 2020.2 libqhull.so on which [email protected] versions 225250 # rely on does not exist anymore, only libqhull_r.so
@@ -240,10 +265,9 @@ class PyMatplotlib(PythonPackage):
240265 depends_on ("py-setuptools-scm-git-archive" , when = "@3.5" , type = "build" )
241266
242267 # Testing dependencies
243- # https://matplotlib.org/stable/devel/development_setup.html#additional-dependencies-for-testing
244- depends_on (
"[email protected] :" ,
type = "test" )
245- depends_on (
"[email protected] :" ,
type = "test" )
246- # depends_on("inkscape@:0", type="test")
268+ # Required
269+ depends_on (
"[email protected] build_system=autotools" ,
type = "test" )
270+ depends_on ("py-pytest@7:" , type = "test" )
247271
248272 msg = "MacOSX backend requires macOS 10.12+"
249273 conflicts ("platform=linux" , when = "backend=macosx" , msg = msg )
@@ -305,8 +329,23 @@ def configure(self):
305329 if self .spec .satisfies ("%clang" ) or self .spec .satisfies ("%oneapi" ):
306330 config .write ("enable_lto = False\n " )
307331
332+ @run_after ("install" )
333+ def copy_reference_images (self ):
334+ # https://matplotlib.org/devdocs/devel/testing.html#obtain-the-reference-images
335+ install_tree (
336+ join_path ("lib" , "matplotlib" , "tests" , "baseline_images" ),
337+ join_path (python_platlib , "matplotlib" , "tests" , "baseline_images" ),
338+ )
339+ for toolkit in ["axes_grid1" , "axisartist" , "mplot3d" ]:
340+ install_tree (
341+ join_path ("lib" , "mpl_toolkits" , toolkit , "tests" , "baseline_images" ),
342+ join_path (python_platlib , "mpl_toolkits" , toolkit , "tests" , "baseline_images" ),
343+ )
344+
308345 @run_after ("install" )
309346 @on_package_attributes (run_tests = True )
310- def build_test (self ):
311- pytest = which ("pytest" )
312- pytest ()
347+ def install_test (self ):
348+ # https://matplotlib.org/devdocs/devel/testing.html#run-the-tests
349+ python ("-m" , "pytest" , "--pyargs" , "matplotlib.tests" )
350+ for toolkit in ["axes_grid1" , "axisartist" , "mplot3d" ]:
351+ python ("-m" , "pytest" , "--pyargs" , f"mpl_toolkits.{ toolkit } .tests" )
0 commit comments