#4 Add test data subpackage
Merged 5 years ago by pviktori. Opened 5 years ago by qulogic.
rpms/ qulogic/python-matplotlib master  into  master

file modified
+32 -1
@@ -41,7 +41,7 @@ 

  

  Name:           python-matplotlib

  Version:        2.2.2

- Release:        1%{?rctag:.%{rctag}}%{?dist}

+ Release:        2%{?rctag:.%{rctag}}%{?dist}

  Summary:        Python 2D plotting library

  # qt4_editor backend is MIT

  License:        Python and MIT
@@ -221,6 +221,14 @@ 

  %description -n python2-matplotlib-wx

  %{summary}

  

+ %package -n python2-matplotlib-test-data

+ Summary:        Test data for python2-matplotlib

+ Requires:       python2-matplotlib%{?_isa} = %{version}-%{release}

+ %{?python_provide:%python_provide python2-matplotlib-test-data}

+ 

+ %description -n python2-matplotlib-test-data

+ %{summary}

+ 

  %package -n python2-matplotlib-doc

  Summary:        Documentation files for python-matplotlib

  %if %{with_html}
@@ -353,6 +361,15 @@ 

  %description -n python3-matplotlib-tk

  %{summary}

  

+ %package -n python3-matplotlib-test-data

+ Summary:        Test data for python3-matplotlib

+ Requires:       python3-matplotlib%{?_isa} = %{version}-%{release}

+ %{?python_provide:%python_provide python3-matplotlib-test-data}

+ 

+ %description -n python3-matplotlib-test-data

+ %{summary}

+ 

+ 

  %prep

  %autosetup -n matplotlib-%{version}%{?rctag} -N

  %patch0001 -p1
@@ -453,6 +470,7 @@ 

  MPLCONFIGDIR=$PWD \

  MATPLOTLIBDATA=%{buildroot}%{_datadir}/matplotlib/mpl-data \

  PYTHONPATH=%{buildroot}%{python2_sitearch} \

+ PYTHONDONTWRITEBYTECODE=1 \

       xvfb-run -a -s "-screen 0 640x480x24" \

           %{__python2} -m pytest --pyargs matplotlib -ra -n $(getconf _NPROCESSORS_ONLN) \

               -m 'not network' \
@@ -461,6 +479,7 @@ 

  MPLCONFIGDIR=$PWD \

  MATPLOTLIBDATA=%{buildroot}%{_datadir}/matplotlib/mpl-data \

  PYTHONPATH=%{buildroot}%{python3_sitearch} \

+ PYTHONDONTWRITEBYTECODE=1 \

       xvfb-run -a -s "-screen 0 640x480x24" \

           %{__python3} tests.py -ra -n $(getconf _NPROCESSORS_ONLN) \

               -m 'not network' \
@@ -501,6 +520,10 @@ 

  %exclude %{_pkgdocdir}/*

  %exclude %{_pkgdocdir}/*/*

  

+ %files -n python2-matplotlib-test-data

+ %{python2_sitearch}/matplotlib/tests/baseline_images/

+ %{python2_sitearch}/mpl_toolkits/tests/baseline_images/

+ 

  %files -n python2-matplotlib-qt4

  %{python2_sitearch}/matplotlib/backends/backend_qt4.*

  %{python2_sitearch}/matplotlib/backends/backend_qt4agg.*
@@ -557,6 +580,10 @@ 

  %exclude %{python3_sitearch}/matplotlib/backends/_tkagg.*

  %exclude %{_pkgdocdir}/*/

  

+ %files -n python3-matplotlib-test-data

+ %{python3_sitearch}/matplotlib/tests/baseline_images/

+ %{python3_sitearch}/mpl_toolkits/tests/baseline_images/

+ 

  %files -n python3-matplotlib-qt4

  %{python3_sitearch}/matplotlib/backends/backend_qt4.*

  %{python3_sitearch}/matplotlib/backends/__pycache__/backend_qt4.*
@@ -581,6 +608,10 @@ 

  %{python3_sitearch}/matplotlib/backends/_tkagg.*

  

  %changelog

+ * Tue Apr 17 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.2-2

+ - Remove bytecode produced by pytest

+ - Add python?-matplotlib-test-data subpackages

+ 

  * Sat Mar 31 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.2-1

  - Update to latest release

  - Run tests in parallel

file modified
-2
@@ -1,5 +1,3 @@ 

- SHA512 (matplotlib-2.1.2.tar.gz) = fd93901b12a7f47cdc36d38d18de43b0cc8623dcd5597cfc1177e63cf90b0c87f718135176e2c077cd1316566a394e09e8e8e9db2ce128ee7f03021cac45543e

- SHA512 (matplotlib-2.1.2-with-freetype-2.8.tar.gz) = abe03cf24d653ecaefcda56b60631b7200d7e2d5078801f61270d5329da8e6767773a1347a1c9c7b457a0a12427c345d70e700c156dedab27275875f5bcbc439

  SHA512 (matplotlib-2.2.2-with-freetype-2.8.tar.gz) = b31a56ee3594ec50ad6980112b435ae7cb37a0c5826f13997c5ec432c8158e584d3ef58204bff1cd2cb702dc6f050f4daea47576bd1982f40746b424da056d4d

  SHA512 (matplotlib-2.2.2-with-freetype-2.9.tar.gz) = c1587ab3de11c5713ed7be91ecd9b31e083dd352f2af4177fd98f5bd46921eb9d4396013c58cf907618e6fbee62a0f39442e64f1df25976758fab02e5822a03f

  SHA512 (matplotlib-2.2.2.tar.gz) = 58dbeabafa7cd008cf5a585829a5b9f098114a43700dedbd7cc3ed09180ea99a870d06295fe8f1d47f1eb807d264924a4b6fb7cf47e6bc3b74045aa4f0714ac9

I need these to run tests from mplcairo (an externally provided backend), though they're really mostly just smoke-tests at the moment. Also, make sure that pytest does not create its own bytecode files because they encode the builddir path and break things on an installed system.

I would also like to point out that the Xvfb bug is fixed, so builds on Rawhide should work again.

PS, small reminder that simple-koji-ci is broken here, and won't build this properly, so don't rely on that failure.

A proper working scratch build is here.

Pull-Request has been merged by pviktori

5 years ago