2020-07-19 04:27:41 +00:00
|
|
|
%bcond_with html
|
|
|
|
%bcond_without check
|
|
|
|
# https://fedorahosted.org/fpc/ticket/381
|
|
|
|
%bcond_without bundled_fonts
|
2017-01-09 01:42:34 +00:00
|
|
|
|
2021-02-01 07:10:34 +00:00
|
|
|
# No WX for EL8/ELN/EL9
|
|
|
|
%if 0%{?rhel} >= 8
|
|
|
|
%bcond_with wx
|
|
|
|
%else
|
|
|
|
%bcond_without wx
|
|
|
|
%endif
|
|
|
|
|
2018-08-14 09:54:43 +00:00
|
|
|
# the default backend; one of GTK3Agg GTK3Cairo MacOSX Qt4Agg Qt5Agg TkAgg
|
|
|
|
# WXAgg Agg Cairo PS PDF SVG
|
2014-02-11 14:17:25 +00:00
|
|
|
%global backend TkAgg
|
|
|
|
|
2015-02-26 01:41:46 +00:00
|
|
|
%if "%{backend}" == "TkAgg"
|
|
|
|
%global backend_subpackage tk
|
|
|
|
%else
|
2021-08-21 01:22:02 +00:00
|
|
|
% if "%{backend}" == "Qt5Agg"
|
2015-02-26 01:41:46 +00:00
|
|
|
%global backend_subpackage qt5
|
2021-08-21 01:22:02 +00:00
|
|
|
% else
|
|
|
|
% if "%{backend}" == "WXAgg"
|
2018-08-28 06:47:16 +00:00
|
|
|
%global backend_subpackage wx
|
2015-02-26 01:41:46 +00:00
|
|
|
% endif
|
|
|
|
% endif
|
|
|
|
%endif
|
|
|
|
|
2015-02-25 04:07:46 +00:00
|
|
|
# Use the same directory of the main package for subpackage licence and docs
|
|
|
|
%global _docdir_fmt %{name}
|
|
|
|
|
2018-11-10 09:33:30 +00:00
|
|
|
# Updated test images for new FreeType.
|
2022-05-04 23:14:19 +00:00
|
|
|
%global mpl_images_version 3.5.2
|
2018-11-10 09:33:30 +00:00
|
|
|
|
2018-03-31 07:28:44 +00:00
|
|
|
# The version of FreeType in this Fedora branch.
|
2021-08-10 00:22:32 +00:00
|
|
|
%global ftver 2.11.0
|
2018-03-31 07:28:44 +00:00
|
|
|
|
2005-06-30 21:40:07 +00:00
|
|
|
Name: python-matplotlib
|
2022-05-04 23:14:19 +00:00
|
|
|
Version: 3.5.2
|
|
|
|
%global Version 3.5.2
|
2021-11-18 07:31:45 +00:00
|
|
|
Release: %autorelease
|
2012-11-27 20:01:54 +00:00
|
|
|
Summary: Python 2D plotting library
|
2021-11-17 07:07:20 +00:00
|
|
|
# qt_editor backend is MIT
|
2020-11-12 06:35:38 +00:00
|
|
|
# ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is Public Domain
|
|
|
|
License: Python and MIT and Public Domain
|
2012-11-27 20:01:54 +00:00
|
|
|
URL: http://matplotlib.org
|
2020-06-30 00:38:52 +00:00
|
|
|
Source0: https://github.com/matplotlib/matplotlib/archive/v%{Version}/matplotlib-%{Version}.tar.gz
|
2021-08-24 08:09:03 +00:00
|
|
|
Source1: mplsetup.cfg
|
2012-11-27 20:01:54 +00:00
|
|
|
|
2018-03-31 07:28:44 +00:00
|
|
|
# Fedora-specific patches; see:
|
2019-04-23 10:17:43 +00:00
|
|
|
# https://github.com/fedora-python/matplotlib/tree/fedora-patches
|
2018-03-31 07:28:44 +00:00
|
|
|
# Updated test images for new FreeType.
|
2018-11-10 09:33:30 +00:00
|
|
|
Source1000: https://github.com/QuLogic/mpl-images/archive/v%{mpl_images_version}-with-freetype-%{ftver}/matplotlib-%{mpl_images_version}-with-freetype-%{ftver}.tar.gz
|
2018-03-31 07:28:44 +00:00
|
|
|
# Search in /etc/matplotlibrc:
|
|
|
|
Patch1001: 0001-matplotlibrc-path-search-fix.patch
|
2019-05-31 05:44:54 +00:00
|
|
|
# Increase tolerances for new FreeType everywhere:
|
2020-03-04 04:05:13 +00:00
|
|
|
Patch1002: 0002-Set-FreeType-version-to-%{ftver}-and-update-tolerances.patch
|
2022-05-04 23:14:19 +00:00
|
|
|
Patch1003: 0003-Increase-a-few-test-tolerances-on-some-arches.patch
|
2020-06-30 00:38:52 +00:00
|
|
|
|
2018-08-14 10:15:50 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
2019-08-13 09:28:10 +00:00
|
|
|
BuildRequires: glibc-langpack-en
|
2012-11-27 20:01:54 +00:00
|
|
|
BuildRequires: freetype-devel
|
|
|
|
BuildRequires: libpng-devel
|
2015-02-25 03:17:01 +00:00
|
|
|
BuildRequires: qhull-devel
|
2012-12-05 01:31:08 +00:00
|
|
|
BuildRequires: xorg-x11-server-Xvfb
|
2012-11-27 20:01:54 +00:00
|
|
|
BuildRequires: zlib-devel
|
2015-11-15 13:45:49 +00:00
|
|
|
|
2020-06-30 09:42:19 +00:00
|
|
|
BuildRequires: ghostscript
|
2021-02-01 07:09:28 +00:00
|
|
|
# No ImageMagick for EL8/ELN/EL9
|
2021-11-17 06:25:26 +00:00
|
|
|
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} < 8)
|
2020-06-30 09:42:19 +00:00
|
|
|
BuildRequires: ImageMagick
|
2021-02-01 07:09:28 +00:00
|
|
|
%endif
|
2020-07-01 01:09:32 +00:00
|
|
|
%ifnarch s390x
|
2020-06-30 09:42:19 +00:00
|
|
|
BuildRequires: inkscape
|
2020-07-01 01:09:32 +00:00
|
|
|
%endif
|
2020-06-30 09:42:19 +00:00
|
|
|
|
2021-02-16 17:19:37 +00:00
|
|
|
BuildRequires: texlive-collection-basic
|
|
|
|
BuildRequires: texlive-collection-fontsrecommended
|
|
|
|
BuildRequires: texlive-collection-latex
|
|
|
|
BuildRequires: texlive-collection-latexrecommended
|
2020-06-30 09:42:19 +00:00
|
|
|
BuildRequires: texlive-dvipng
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: texlive-latex-bin
|
2021-02-16 17:19:37 +00:00
|
|
|
BuildRequires: texlive-luahbtex
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: texlive-tex-bin
|
|
|
|
BuildRequires: texlive-xetex-bin
|
|
|
|
# Search for documentclass and add the classes here.
|
|
|
|
BuildRequires: tex(article.cls)
|
|
|
|
BuildRequires: tex(minimal.cls)
|
|
|
|
# Search for inputenc and add any encodings used with it.
|
|
|
|
BuildRequires: tex(utf8.def)
|
2020-06-20 08:48:13 +00:00
|
|
|
BuildRequires: tex(utf8x.def)
|
2020-06-20 09:02:11 +00:00
|
|
|
# Found with: rg -Io 'usepackage(\[.+\])?\{.+\}' lib | rg -o '\{.+\}' | sort -u
|
|
|
|
# and then removing duplicates in one line, etc.
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(avant.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(bm.sty)
|
2020-06-20 08:48:13 +00:00
|
|
|
BuildRequires: tex(chancery.sty)
|
|
|
|
BuildRequires: tex(charter.sty)
|
2021-11-18 07:31:45 +00:00
|
|
|
BuildRequires: tex(chemformula.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(color.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(courier.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(euler.sty)
|
2021-02-16 17:19:37 +00:00
|
|
|
BuildRequires: tex(fancyhdr.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(fontenc.sty)
|
|
|
|
BuildRequires: tex(fontspec.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(geometry.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(graphicx.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(helvet.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(import.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(inputenc.sty)
|
|
|
|
BuildRequires: tex(mathpazo.sty)
|
|
|
|
BuildRequires: tex(mathptmx.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(pgf.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(preview.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(psfrag.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(sfmath.sty)
|
|
|
|
BuildRequires: tex(textcomp.sty)
|
|
|
|
BuildRequires: tex(txfonts.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(type1cm.sty)
|
2020-05-21 13:04:31 +00:00
|
|
|
BuildRequires: tex(type1ec.sty)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(unicode-math.sty)
|
|
|
|
# See BakomaFonts._fontmap in lib/matplotlib/mathtext.py
|
|
|
|
BuildRequires: tex(cmb10.tfm)
|
|
|
|
BuildRequires: tex(cmex10.tfm)
|
|
|
|
BuildRequires: tex(cmmi10.tfm)
|
|
|
|
BuildRequires: tex(cmr10.tfm)
|
2020-06-20 08:48:13 +00:00
|
|
|
BuildRequires: tex(cmss10.tfm)
|
2020-06-20 09:02:11 +00:00
|
|
|
BuildRequires: tex(cmsy10.tfm)
|
|
|
|
BuildRequires: tex(cmtt10.tfm)
|
2020-05-21 13:04:31 +00:00
|
|
|
|
2015-11-15 13:45:49 +00:00
|
|
|
%description
|
2020-03-04 04:05:13 +00:00
|
|
|
Matplotlib is a Python 2D plotting library which produces publication
|
2015-11-15 13:45:49 +00:00
|
|
|
quality figures in a variety of hardcopy formats and interactive
|
2020-03-04 04:05:13 +00:00
|
|
|
environments across platforms. Matplotlib can be used in Python
|
|
|
|
scripts, the Python and IPython shell, web application servers, and
|
|
|
|
various graphical user interface toolkits.
|
2015-11-15 13:45:49 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2018-09-19 18:47:47 +00:00
|
|
|
%package -n python3-matplotlib-data
|
2014-01-28 16:50:22 +00:00
|
|
|
Summary: Data used by python-matplotlib
|
2016-09-22 13:12:52 +00:00
|
|
|
BuildArch: noarch
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with bundled_fonts}
|
2018-09-19 18:47:47 +00:00
|
|
|
Requires: python3-matplotlib-data-fonts = %{version}-%{release}
|
2014-01-28 16:50:22 +00:00
|
|
|
%endif
|
2019-07-03 09:55:18 +00:00
|
|
|
Obsoletes: python-matplotlib-data < 3
|
2014-01-28 16:50:22 +00:00
|
|
|
|
2018-09-19 18:47:47 +00:00
|
|
|
%description -n python3-matplotlib-data
|
2014-01-28 16:50:22 +00:00
|
|
|
%{summary}
|
|
|
|
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with bundled_fonts}
|
2018-09-19 18:47:47 +00:00
|
|
|
%package -n python3-matplotlib-data-fonts
|
2014-01-28 16:50:22 +00:00
|
|
|
Summary: Fonts used by python-matplotlib
|
2018-09-21 08:25:34 +00:00
|
|
|
# STIX and Computer Modern is OFL
|
|
|
|
# DejaVu is Bitstream Vera and Public Domain
|
|
|
|
License: OFL and Bitstream Vera and Public Domain
|
2014-01-28 16:50:22 +00:00
|
|
|
BuildArch: noarch
|
2018-09-19 18:47:47 +00:00
|
|
|
Requires: python3-matplotlib-data = %{version}-%{release}
|
2019-07-03 09:55:18 +00:00
|
|
|
Obsoletes: python-matplotlib-data-fonts < 3
|
2014-01-28 16:50:22 +00:00
|
|
|
|
2018-09-19 18:47:47 +00:00
|
|
|
%description -n python3-matplotlib-data-fonts
|
2014-01-28 16:50:22 +00:00
|
|
|
%{summary}
|
|
|
|
%endif
|
|
|
|
|
2012-11-27 20:01:54 +00:00
|
|
|
%package -n python3-matplotlib
|
|
|
|
Summary: Python 2D plotting library
|
|
|
|
BuildRequires: python3-devel
|
2021-08-21 06:23:28 +00:00
|
|
|
BuildRequires: python3-cairo
|
2012-11-27 20:01:54 +00:00
|
|
|
BuildRequires: python3-gobject
|
|
|
|
BuildRequires: python3-pytz
|
2018-03-31 07:28:44 +00:00
|
|
|
BuildRequires: python3-sphinx
|
2016-09-22 13:12:52 +00:00
|
|
|
Requires: dejavu-sans-fonts
|
2020-06-01 09:46:40 +00:00
|
|
|
Recommends: texlive-dvipng
|
|
|
|
Requires: (texlive-dvipng if texlive-base)
|
2018-09-19 18:47:47 +00:00
|
|
|
Requires: python3-matplotlib-data = %{version}-%{release}
|
2012-11-27 20:01:54 +00:00
|
|
|
Requires: python3-cairo
|
2016-09-22 13:12:52 +00:00
|
|
|
Requires: python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with check}
|
2017-09-27 05:29:13 +00:00
|
|
|
BuildRequires: python3-pytest
|
2019-11-23 01:10:32 +00:00
|
|
|
BuildRequires: python3-pytest-rerunfailures
|
|
|
|
BuildRequires: python3-pytest-timeout
|
2018-03-13 20:43:27 +00:00
|
|
|
BuildRequires: python3-pytest-xdist
|
2020-06-30 00:38:52 +00:00
|
|
|
BuildRequires: python3-pikepdf
|
2016-09-22 13:12:52 +00:00
|
|
|
%endif
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{without bundled_fonts}
|
2015-11-15 13:16:29 +00:00
|
|
|
Requires: stix-math-fonts
|
2013-04-02 16:20:33 +00:00
|
|
|
%else
|
2016-09-22 13:12:52 +00:00
|
|
|
Provides: bundled(stix-math-fonts)
|
|
|
|
%endif
|
2012-11-27 20:01:54 +00:00
|
|
|
|
|
|
|
%description -n python3-matplotlib
|
2020-03-04 04:05:13 +00:00
|
|
|
Matplotlib is a Python 2D plotting library which produces publication
|
2012-11-27 20:01:54 +00:00
|
|
|
quality figures in a variety of hardcopy formats and interactive
|
2020-03-04 04:05:13 +00:00
|
|
|
environments across platforms. Matplotlib can be used in Python
|
|
|
|
scripts, the Python and IPython shell, web application servers, and
|
|
|
|
various graphical user interface toolkits.
|
2012-11-27 20:01:54 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-02-25 03:17:01 +00:00
|
|
|
%package -n python3-matplotlib-qt5
|
|
|
|
Summary: Qt5 backend for python3-matplotlib
|
|
|
|
BuildRequires: python3-qt5
|
2016-09-22 13:12:52 +00:00
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
2015-02-25 03:17:01 +00:00
|
|
|
Requires: python3-qt5
|
2021-08-21 01:22:02 +00:00
|
|
|
Obsoletes: python3-matplotlib-qt4 < 3.5.0-0
|
2015-02-25 03:17:01 +00:00
|
|
|
|
|
|
|
%description -n python3-matplotlib-qt5
|
|
|
|
%{summary}
|
|
|
|
|
2015-02-26 02:33:05 +00:00
|
|
|
%package -n python3-matplotlib-gtk3
|
|
|
|
Summary: GTK3 backend for python3-matplotlib
|
|
|
|
# This should be converted to typelib(Gtk) when supported
|
|
|
|
BuildRequires: gtk3
|
|
|
|
BuildRequires: python3-gobject
|
|
|
|
Requires: gtk3%{?_isa}
|
|
|
|
Requires: python3-gobject%{?_isa}
|
2016-09-22 13:12:52 +00:00
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
2015-02-26 02:33:05 +00:00
|
|
|
|
|
|
|
%description -n python3-matplotlib-gtk3
|
|
|
|
%{summary}
|
|
|
|
|
2021-11-17 07:07:20 +00:00
|
|
|
%package -n python3-matplotlib-gtk4
|
|
|
|
Summary: GTK4 backend for python3-matplotlib
|
|
|
|
# This should be converted to typelib(Gtk) when supported
|
|
|
|
BuildRequires: gtk4
|
|
|
|
BuildRequires: python3-gobject
|
|
|
|
Requires: gtk4%{?_isa}
|
|
|
|
Requires: python3-gobject%{?_isa}
|
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python3-matplotlib-gtk4
|
|
|
|
%{summary}
|
|
|
|
|
2012-11-27 20:01:54 +00:00
|
|
|
%package -n python3-matplotlib-tk
|
|
|
|
Summary: Tk backend for python3-matplotlib
|
2021-08-24 08:09:03 +00:00
|
|
|
BuildRequires: python3-pillow-tk
|
2012-11-27 20:01:54 +00:00
|
|
|
BuildRequires: python3-tkinter
|
2016-09-22 13:12:52 +00:00
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
2021-08-24 08:09:03 +00:00
|
|
|
Requires: python3-pillow-tk
|
2012-11-27 20:01:54 +00:00
|
|
|
Requires: python3-tkinter
|
|
|
|
|
|
|
|
%description -n python3-matplotlib-tk
|
|
|
|
%{summary}
|
|
|
|
|
2021-02-01 07:10:34 +00:00
|
|
|
%if %{with wx}
|
2018-08-28 06:47:16 +00:00
|
|
|
%package -n python3-matplotlib-wx
|
|
|
|
Summary: WX backend for python3-matplotlib
|
|
|
|
BuildRequires: python3-wxpython4
|
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: python3-wxpython4
|
|
|
|
|
|
|
|
%description -n python3-matplotlib-wx
|
|
|
|
%{summary}
|
2021-02-01 07:10:34 +00:00
|
|
|
%endif
|
2018-08-28 06:47:16 +00:00
|
|
|
|
2018-08-14 09:54:43 +00:00
|
|
|
%package -n python3-matplotlib-doc
|
|
|
|
Summary: Documentation files for python-matplotlib
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with html}
|
2018-08-14 09:54:43 +00:00
|
|
|
BuildRequires: graphviz
|
2021-08-21 06:23:28 +00:00
|
|
|
BuildRequires: make
|
2018-08-14 09:54:43 +00:00
|
|
|
BuildRequires: python3-sphinx
|
|
|
|
BuildRequires: tex(latex)
|
|
|
|
BuildRequires: tex-preview
|
|
|
|
%endif
|
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python3-matplotlib-doc
|
|
|
|
%{summary}
|
|
|
|
|
2018-04-17 06:36:59 +00:00
|
|
|
%package -n python3-matplotlib-test-data
|
|
|
|
Summary: Test data for python3-matplotlib
|
|
|
|
Requires: python3-matplotlib%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python3-matplotlib-test-data
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
|
2005-06-30 21:40:07 +00:00
|
|
|
%prep
|
2020-06-30 00:38:52 +00:00
|
|
|
%autosetup -n matplotlib-%{Version} -N
|
2018-11-10 09:33:30 +00:00
|
|
|
|
2018-01-24 09:27:51 +00:00
|
|
|
# Fedora-specific patches follow:
|
2017-10-15 22:16:56 +00:00
|
|
|
%patch1001 -p1
|
2018-03-31 07:28:44 +00:00
|
|
|
# Updated test images for new FreeType.
|
2019-05-31 05:44:54 +00:00
|
|
|
%patch1002 -p1
|
2020-06-30 00:38:52 +00:00
|
|
|
gzip -dc %SOURCE1000 | tar xf - --transform='s~^mpl-images-%{mpl_images_version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'
|
2021-02-19 10:46:28 +00:00
|
|
|
|
2021-08-24 08:09:03 +00:00
|
|
|
# Copy mplsetup.cfg to the builddir
|
|
|
|
cp -p %{SOURCE1} mplsetup.cfg
|
2014-01-25 16:06:52 +00:00
|
|
|
|
2021-06-04 07:32:13 +00:00
|
|
|
%patch1003 -p1
|
2021-08-21 06:23:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires -r
|
2021-06-04 07:32:13 +00:00
|
|
|
|
2016-04-30 17:18:22 +00:00
|
|
|
|
2005-06-30 21:40:07 +00:00
|
|
|
%build
|
2019-02-12 23:54:28 +00:00
|
|
|
%set_build_flags
|
2016-09-22 13:12:52 +00:00
|
|
|
export http_proxy=http://127.0.0.1/
|
2018-08-14 09:54:43 +00:00
|
|
|
|
2021-08-21 06:23:28 +00:00
|
|
|
MPLCONFIGDIR=$PWD %pyproject_wheel
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with html}
|
2012-11-27 20:01:54 +00:00
|
|
|
# Need to make built matplotlib libs available for the sphinx extensions:
|
2021-08-21 06:23:28 +00:00
|
|
|
MPLCONFIGDIR=$PWD \
|
|
|
|
PYTHONPATH=$(ls -d %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}) \
|
|
|
|
make -C doc html
|
2011-02-21 22:11:02 +00:00
|
|
|
%endif
|
2012-11-27 20:01:54 +00:00
|
|
|
# Ensure all example files are non-executable so that the -doc
|
|
|
|
# package doesn't drag in dependencies
|
2011-02-26 15:54:02 +00:00
|
|
|
find examples -name '*.py' -exec chmod a-x '{}' \;
|
|
|
|
|
2020-07-19 04:27:41 +00:00
|
|
|
|
2005-06-30 21:40:07 +00:00
|
|
|
%install
|
2016-09-22 13:12:52 +00:00
|
|
|
export http_proxy=http://127.0.0.1/
|
2018-08-14 09:54:43 +00:00
|
|
|
|
2021-08-21 06:23:28 +00:00
|
|
|
MPLCONFIGDIR=$PWD %pyproject_install
|
2021-02-19 10:46:28 +00:00
|
|
|
|
|
|
|
# Delete unnecessary files.
|
|
|
|
rm %{buildroot}%{python3_sitearch}/matplotlib/backends/web_backend/.{eslintrc.js,prettierignore,prettierrc}
|
|
|
|
rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/.gitignore
|
|
|
|
rm %{buildroot}%{python3_sitearch}/matplotlib/tests/tinypages/_static/.gitignore
|
|
|
|
|
|
|
|
# Move files to Fedora-specific locations.
|
2015-02-26 04:26:38 +00:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/matplotlib
|
2018-08-14 09:54:43 +00:00
|
|
|
mv %{buildroot}%{python3_sitearch}/matplotlib/mpl-data \
|
2015-02-26 04:26:38 +00:00
|
|
|
%{buildroot}%{_datadir}/matplotlib
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{without bundled_fonts}
|
2015-02-26 04:26:38 +00:00
|
|
|
rm -rf %{buildroot}%{_datadir}/matplotlib/mpl-data/fonts
|
2014-01-28 16:50:22 +00:00
|
|
|
%endif
|
2005-06-30 21:40:07 +00:00
|
|
|
|
2020-07-19 04:27:41 +00:00
|
|
|
|
|
|
|
%if %{with check}
|
2014-01-25 16:06:52 +00:00
|
|
|
%check
|
2017-09-27 05:29:13 +00:00
|
|
|
# These files confuse pytest, and we want to test the installed copy.
|
|
|
|
rm -rf build*/
|
|
|
|
|
2021-01-27 06:26:04 +00:00
|
|
|
# We need to prime this LaTeX cache stuff, or it might fail while running tests
|
|
|
|
# in parallel.
|
2021-02-19 22:00:18 +00:00
|
|
|
mktexfmt latex.fmt
|
2021-01-27 06:26:04 +00:00
|
|
|
mktexfmt lualatex.fmt
|
|
|
|
mktexfmt pdflatex.fmt
|
|
|
|
mktexfmt xelatex.fmt
|
|
|
|
|
2016-09-22 13:12:52 +00:00
|
|
|
export http_proxy=http://127.0.0.1/
|
2018-03-31 07:28:44 +00:00
|
|
|
# Skips:
|
2018-04-01 00:08:43 +00:00
|
|
|
# * test_invisible_Line_rendering: Checks for "slowness" that often fails on a
|
|
|
|
# heavily-loaded builder.
|
2021-08-24 10:05:43 +00:00
|
|
|
# * test_form_widget_get_with_datetime_and_date_fields is flaky.
|
2014-01-28 16:50:22 +00:00
|
|
|
MPLCONFIGDIR=$PWD \
|
2022-05-05 00:10:57 +00:00
|
|
|
%ifnarch %{ix86}
|
2017-10-07 08:44:54 +00:00
|
|
|
xvfb-run -a -s "-screen 0 640x480x24" \
|
2022-05-05 00:10:57 +00:00
|
|
|
%endif
|
2021-08-21 06:23:28 +00:00
|
|
|
env %{pytest} -ra -n auto \
|
2018-04-01 00:08:43 +00:00
|
|
|
-m 'not network' \
|
2021-08-24 10:05:43 +00:00
|
|
|
-k 'not test_invisible_Line_rendering and not test_form_widget_get_with_datetime_and_date_fields' \
|
2021-08-21 06:23:28 +00:00
|
|
|
--pyargs matplotlib mpl_toolkits.tests
|
2019-07-03 09:55:57 +00:00
|
|
|
%endif
|
2014-01-25 16:06:52 +00:00
|
|
|
|
2020-07-19 04:27:41 +00:00
|
|
|
|
2018-09-19 18:47:47 +00:00
|
|
|
%files -n python3-matplotlib-data
|
2016-09-22 13:12:52 +00:00
|
|
|
%{_datadir}/matplotlib/mpl-data/
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with bundled_fonts}
|
2016-09-22 13:12:52 +00:00
|
|
|
%exclude %{_datadir}/matplotlib/mpl-data/fonts/
|
|
|
|
%endif
|
|
|
|
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with bundled_fonts}
|
2018-09-19 18:47:47 +00:00
|
|
|
%files -n python3-matplotlib-data-fonts
|
2016-09-22 13:12:52 +00:00
|
|
|
%{_datadir}/matplotlib/mpl-data/fonts/
|
|
|
|
%endif
|
|
|
|
|
2018-08-14 09:54:43 +00:00
|
|
|
%files -n python3-matplotlib-doc
|
2011-02-19 12:39:52 +00:00
|
|
|
%doc examples
|
2020-07-19 04:27:41 +00:00
|
|
|
%if %{with html}
|
2012-11-27 20:01:54 +00:00
|
|
|
%doc doc/build/html/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n python3-matplotlib
|
2015-02-26 04:25:06 +00:00
|
|
|
%license LICENSE/
|
2018-03-31 07:28:44 +00:00
|
|
|
%doc README.rst
|
2021-08-21 06:23:28 +00:00
|
|
|
%{python3_sitearch}/matplotlib-*.dist-info/
|
2013-08-02 08:31:00 +00:00
|
|
|
%{python3_sitearch}/matplotlib-*-nspkg.pth
|
2012-11-27 20:01:54 +00:00
|
|
|
%{python3_sitearch}/matplotlib/
|
2016-09-22 13:12:52 +00:00
|
|
|
%exclude %{python3_sitearch}/matplotlib/tests/baseline_images/*
|
2012-11-27 20:01:54 +00:00
|
|
|
%{python3_sitearch}/mpl_toolkits/
|
2016-09-22 13:12:52 +00:00
|
|
|
%exclude %{python3_sitearch}/mpl_toolkits/tests/baseline_images/*
|
2020-07-19 04:27:41 +00:00
|
|
|
%pycached %{python3_sitearch}/pylab.py
|
2020-12-02 09:42:35 +00:00
|
|
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
2020-07-19 04:27:41 +00:00
|
|
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_gtk*.py
|
|
|
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/_backend_tk.py
|
|
|
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_tk*.py
|
2012-11-27 20:01:54 +00:00
|
|
|
%exclude %{python3_sitearch}/matplotlib/backends/_tkagg.*
|
2020-07-19 04:27:41 +00:00
|
|
|
%pycached %exclude %{python3_sitearch}/matplotlib/backends/backend_wx*.py
|
2015-02-25 04:07:46 +00:00
|
|
|
%exclude %{_pkgdocdir}/*/
|
2012-11-27 20:01:54 +00:00
|
|
|
|
2018-04-17 06:36:59 +00:00
|
|
|
%files -n python3-matplotlib-test-data
|
|
|
|
%{python3_sitearch}/matplotlib/tests/baseline_images/
|
|
|
|
%{python3_sitearch}/mpl_toolkits/tests/baseline_images/
|
|
|
|
|
2015-02-25 03:17:01 +00:00
|
|
|
%files -n python3-matplotlib-qt5
|
2021-12-23 07:02:03 +00:00
|
|
|
%pycached %{python3_sitearch}/matplotlib/backends/backend_qt5*.py
|
2015-02-25 03:17:01 +00:00
|
|
|
|
2015-02-26 02:33:05 +00:00
|
|
|
%files -n python3-matplotlib-gtk3
|
2021-11-17 07:07:20 +00:00
|
|
|
%pycached %{python3_sitearch}/matplotlib/backends/backend_gtk3*.py
|
|
|
|
|
|
|
|
%files -n python3-matplotlib-gtk4
|
|
|
|
%pycached %{python3_sitearch}/matplotlib/backends/backend_gtk4*.py
|
2015-02-26 02:33:05 +00:00
|
|
|
|
2012-11-27 20:01:54 +00:00
|
|
|
%files -n python3-matplotlib-tk
|
2020-07-19 04:27:41 +00:00
|
|
|
%pycached %{python3_sitearch}/matplotlib/backends/backend_tk*.py
|
|
|
|
%pycached %{python3_sitearch}/matplotlib/backends/_backend_tk.py
|
2012-11-27 20:01:54 +00:00
|
|
|
%{python3_sitearch}/matplotlib/backends/_tkagg.*
|
2006-07-03 21:30:23 +00:00
|
|
|
|
2021-02-01 07:10:34 +00:00
|
|
|
%if %{with wx}
|
2018-08-28 06:47:16 +00:00
|
|
|
%files -n python3-matplotlib-wx
|
2020-07-19 04:27:41 +00:00
|
|
|
%pycached %{python3_sitearch}/matplotlib/backends/backend_wx*.py
|
2021-02-01 07:10:34 +00:00
|
|
|
%endif
|
2018-08-28 06:47:16 +00:00
|
|
|
|
2018-08-14 01:27:10 +00:00
|
|
|
|
2005-06-30 21:40:07 +00:00
|
|
|
%changelog
|
2021-08-13 04:32:59 +00:00
|
|
|
%autochangelog
|