diff --git a/0001-matplotlibrc-path-search-fix.patch b/0001-matplotlibrc-path-search-fix.patch index 41137d0..0fe5e71 100644 --- a/0001-matplotlibrc-path-search-fix.patch +++ b/0001-matplotlibrc-path-search-fix.patch @@ -12,17 +12,7 @@ diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 5f964e0b34..f82d92466a 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py -@@ -590,7 +590,8 @@ def get_cachedir(): - @_logged_cached('matplotlib data path: %s') - def get_data_path(): - """Return the path to Matplotlib data.""" -- return str(Path(__file__).with_name("mpl-data")) -+ return str(Path(__file__).parent.parent.parent.parent.parent / -+ 'share/matplotlib/mpl-data') - - - def matplotlib_fname(): -@@ -610,6 +611,7 @@ def matplotlib_fname(): +@@ -610,6 +610,7 @@ def matplotlib_fname(): is not defined) - On other platforms, - ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined @@ -30,7 +20,7 @@ index 5f964e0b34..f82d92466a 100644 - Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always exist. """ -@@ -628,6 +630,7 @@ def matplotlib_fname(): +@@ -628,6 +629,7 @@ def matplotlib_fname(): yield matplotlibrc yield os.path.join(matplotlibrc, 'matplotlibrc') yield os.path.join(get_configdir(), 'matplotlibrc') diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 3b4049e..654fbef 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -148,17 +148,6 @@ Matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code. -%package -n python3-matplotlib-data -Summary: Data used by python-matplotlib -BuildArch: noarch -%if %{with bundled_fonts} -Requires: python3-matplotlib-data-fonts = %{version}-%{release} -%endif -Obsoletes: python-matplotlib-data < 3 - -%description -n python3-matplotlib-data -%{summary} - %if %{with bundled_fonts} %package -n python3-matplotlib-data-fonts Summary: Fonts used by python-matplotlib @@ -166,7 +155,11 @@ Summary: Fonts used by python-matplotlib # DejaVu is Bitstream Vera and Public Domain License: OFL-1.1 AND Bitstream-Vera AND LicenseRef-Fedora-Public-Domain BuildArch: noarch -Requires: python3-matplotlib-data = %{version}-%{release} +%if %{without bundled_fonts} +Requires: stix-math-fonts +%else +Provides: bundled(stix-math-fonts) +%endif Obsoletes: python-matplotlib-data-fonts < 3 %description -n python3-matplotlib-data-fonts @@ -182,7 +175,7 @@ BuildRequires: python3dist(sphinx) Requires: dejavu-sans-fonts Recommends: texlive-dvipng Requires: (texlive-dvipng if texlive-base) -Requires: python3-matplotlib-data = %{version}-%{release} +Requires: python3-matplotlib-data-fonts = %{version}-%{release} Requires: python3dist(pycairo) Recommends: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release} %if %{with check} @@ -192,11 +185,10 @@ BuildRequires: python3dist(pytest-timeout) BuildRequires: python3dist(pytest-xdist) BuildRequires: python3dist(pikepdf) %endif -%if %{without bundled_fonts} -Requires: stix-math-fonts -%else -Provides: bundled(stix-math-fonts) -%endif +# Remove in F45. +Provides: python3-matplotlib-data = %{version}-%{release} +Obsoletes: python3-matplotlib-data < 3.10.3-4 +Obsoletes: python-matplotlib-data < 3 %description -n python3-matplotlib Matplotlib is a Python 2D plotting library which produces publication @@ -346,11 +338,8 @@ rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/.gitignore rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/_static/.gitignore # Move files to Fedora-specific locations. -mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib -mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data \ - %{buildroot}%{_datadir}/matplotlib %if %{without bundled_fonts} -rm -rf %{buildroot}%{_datadir}/matplotlib/mpl-data/fonts +rm -rf %{buildroot}%{python3_sitearch}/matplotlib/mpl-data/fonts %endif @@ -398,15 +387,9 @@ xwfb-run -- env MPLCONFIGDIR=$PWD \ %endif -%files -n python3-matplotlib-data -%{_datadir}/matplotlib/mpl-data/ -%if %{with bundled_fonts} -%exclude %{_datadir}/matplotlib/mpl-data/fonts/ -%endif - -%if %{with bundled_fonts} %files -n python3-matplotlib-data-fonts -%{_datadir}/matplotlib/mpl-data/fonts/ +%if %{with bundled_fonts} +%{python3_sitearch}/matplotlib/mpl-data/fonts/ %endif %files -n python3-matplotlib-doc