diff --git a/.gitignore b/.gitignore index ffda3d0..dc5638d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ matplotlib-1.0.0-without-gpc.tar.gz /mpl_sampledata-1.0.1.tar.gz /matplotlib-1.2.0-without-gpc.tar.gz /matplotlib-1.3.0-without-gpc.tar.xz +/matplotlib-1.3.1-without-gpc.tar.xz diff --git a/python-matplotlib-system-cxx.patch b/python-matplotlib-system-cxx.patch index c27922e..7e21bd6 100644 --- a/python-matplotlib-system-cxx.patch +++ b/python-matplotlib-system-cxx.patch @@ -1,8 +1,6 @@ -diff --git a/setupext.py b/setupext.py -index 7b629b6..8131bb1 100644 ---- a/setupext.py -+++ b/setupext.py -@@ -674,16 +674,9 @@ class CXX(SetupPackage): +--- setupext.py.orig 2014-01-25 15:06:39.460916454 +0100 ++++ setupext.py 2014-01-25 15:06:53.080946205 +0100 +@@ -768,12 +768,6 @@ name = 'pycxx' def check(self): @@ -12,11 +10,6 @@ index 7b629b6..8131bb1 100644 - self.__class__.found_external = False - return ("Official versions of PyCXX are not compatible with " - "Python 3.x. Using local copy") -- + self.__class__.found_external = True old_stdout = sys.stdout -- sys.stdout = io.BytesIO() -+ #sys.stdout = io.BytesIO() - try: - import CXX - except ImportError: diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 875151d..11b1f66 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -6,6 +6,7 @@ %endif %global __provides_exclude_from .*/site-packages/.*\\.so$ %global with_html 1 +%global run_tests 0 # On RHEL 7 onwards, don't build with wx: %if 0%{?rhel} >= 7 @@ -16,7 +17,7 @@ Name: python-matplotlib -Version: 1.3.0 +Version: 1.3.1 Release: 1%{?dist} Summary: Python 2D plotting library Group: Development/Libraries @@ -28,6 +29,7 @@ URL: http://matplotlib.org #sha1sum matplotlib-1.2.0-without-gpc.tar.gz #92ada4ef4e7374d67e46e30bfb08c3fed068d680 matplotlib-1.2.0-without-gpc.tar.gz Source0: matplotlib-%{version}-without-gpc.tar.xz +Source1: setup.cfg Patch0: %{name}-noagg.patch Patch1: %{name}-system-cxx.patch @@ -182,12 +184,18 @@ Requires: python3-tkinter %prep %setup -q -n matplotlib-%{version} +# Copy setup.cfg to the builddir +cp %{SOURCE1} . + +# Use fontconfig by default +sed -i 's/\(USE_FONTCONFIG = \)False/\1True/' lib/matplotlib/font_manager.py + # Remove bundled libraries rm -r agg24 CXX # Remove references to bundled libraries %patch0 -b .noagg -%patch1 -p1 -b .cxx +%patch1 -b .cxx chmod -x lib/matplotlib/mpl-data/images/*.svg @@ -231,6 +239,17 @@ pushd %{py3dir} popd %endif +%if %{run_tests} +%check +PYTHON_PATH=$RPM_BUILD_ROOT%{python_sitearch} \ + %{__python} -c "import matplotlib; matplotlib.test()" + +%if %{with_python3} +PYTHON_PATH=$RPM_BUILD_ROOT%{python3_sitearch} \ + %{__python3} -c "import matplotlib; matplotlib.test()" +%endif +%endif # run_tests + %files %doc README.rst %doc LICENSE/ @@ -312,6 +331,12 @@ popd %endif %changelog +* Sat Jan 25 2014 Thomas Spura - 1.3.1-1 +- update to 1.3.1 +- use GTKAgg as backend (#1030396, #982793, #1049624) +- use fontconfig +- add %%check for local testing (testing requires a display) + * Wed Aug 7 2013 Thomas Spura - 1.3.0-1 - update to new version - use xz to compress sources diff --git a/sources b/sources index eea051c..2f154c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -54c01e06ccdb213bde4ce39881016aec matplotlib-1.3.0-without-gpc.tar.xz +832170ea532d5f7ca227ea04f044291e matplotlib-1.3.1-without-gpc.tar.xz