44 |
|
|
45 |
Name: python-matplotlib |
Name: python-matplotlib |
46 |
Version: 3.3.2 |
Version: 3.3.2 |
47 |
Release: %mkrel 1 |
Release: %mkrel 2 |
48 |
Summary: Python 2D plotting library |
Summary: Python 2D plotting library |
49 |
Group: Development/Python |
Group: Development/Python |
50 |
# qt4_editor backend is MIT |
# qt4_editor backend is MIT |
57 |
# https://github.com/fedora-python/matplotlib/tree/fedora-patches |
# https://github.com/fedora-python/matplotlib/tree/fedora-patches |
58 |
# Updated test images for new FreeType. |
# Updated test images for new FreeType. |
59 |
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz |
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz |
|
# Search in /etc/matplotlibrc: |
|
|
Patch1001: 0001-matplotlibrc-path-search-fix.patch |
|
60 |
# Increase tolerances for new FreeType everywhere: |
# Increase tolerances for new FreeType everywhere: |
61 |
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch |
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch |
62 |
|
|
242 |
%autosetup -n matplotlib-%{version}%{?rctag} -N |
%autosetup -n matplotlib-%{version}%{?rctag} -N |
243 |
|
|
244 |
# Fedora-specific patches follow: |
# Fedora-specific patches follow: |
|
%patch1001 -p1 |
|
245 |
# Updated test images for new FreeType. |
# Updated test images for new FreeType. |
246 |
%patch1002 -p1 |
%patch1002 -p1 |
247 |
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~' |
gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~' |
277 |
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} |
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} |
278 |
chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py |
chmod +x %{buildroot}%{python3_sitearch}/matplotlib/dates.py |
279 |
mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib |
mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib |
|
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data/matplotlibrc \ |
|
|
%{buildroot}%{_sysconfdir} |
|
280 |
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data \ |
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data \ |
281 |
%{buildroot}%{_datadir}/matplotlib |
%{buildroot}%{_datadir}/matplotlib |
282 |
%if !%{with_bundled_fonts} |
%if !%{with_bundled_fonts} |
295 |
# * wxagg is broken on ppc64le: |
# * wxagg is broken on ppc64le: |
296 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1738752 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1738752 |
297 |
MPLCONFIGDIR=$PWD \ |
MPLCONFIGDIR=$PWD \ |
298 |
MATPLOTLIBRC=%{buildroot}%{_sysconfdir}/matplotlibrc \ |
MATPLOTLIBRC=%{buildroot}%{_datadir}/matplotlib/mpl-data/matplotlibrc \ |
299 |
PYTHONPATH=%{buildroot}%{python3_sitearch} \ |
PYTHONPATH=%{buildroot}%{python3_sitearch} \ |
300 |
PYTHONDONTWRITEBYTECODE=1 \ |
PYTHONDONTWRITEBYTECODE=1 \ |
301 |
xvfb-run -a -s "-screen 0 640x480x24" \ |
xvfb-run -a -s "-screen 0 640x480x24" \ |
304 |
-k 'not test_invisible_Line_rendering and not Qt5Agg' |
-k 'not test_invisible_Line_rendering and not Qt5Agg' |
305 |
# Run Qt5Agg tests separately to not conflict with Qt4 tests. |
# Run Qt5Agg tests separately to not conflict with Qt4 tests. |
306 |
MPLCONFIGDIR=$PWD \ |
MPLCONFIGDIR=$PWD \ |
307 |
MATPLOTLIBRC=%{buildroot}%{_sysconfdir}/matplotlibrc \ |
MATPLOTLIBRC=%{buildroot}%{_datadir}/matplotlib/mpl-data/matplotlibrc \ |
308 |
PYTHONPATH=%{buildroot}%{python3_sitearch} \ |
PYTHONPATH=%{buildroot}%{python3_sitearch} \ |
309 |
PYTHONDONTWRITEBYTECODE=1 \ |
PYTHONDONTWRITEBYTECODE=1 \ |
310 |
xvfb-run -a -s "-screen 0 640x480x24" \ |
xvfb-run -a -s "-screen 0 640x480x24" \ |
313 |
%endif |
%endif |
314 |
|
|
315 |
%files -n python3-matplotlib-data |
%files -n python3-matplotlib-data |
|
%{_sysconfdir}/matplotlibrc |
|
316 |
%{_datadir}/matplotlib/mpl-data/ |
%{_datadir}/matplotlib/mpl-data/ |
317 |
%if %{with_bundled_fonts} |
%if %{with_bundled_fonts} |
318 |
%exclude %{_datadir}/matplotlib/mpl-data/fonts/ |
%exclude %{_datadir}/matplotlib/mpl-data/fonts/ |