eb0ae8e
%if ! (0%{?rhel} > 5)
eb0ae8e
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
eb0ae8e
%endif
eb0ae8e
eb0ae8e
%{?filter_setup:
eb0ae8e
%filter_provides_in %{python_sitearch}/.*\.so$
eb0ae8e
%filter_setup
eb0ae8e
}
5c67a30
a706a1d
# We include capability for building a doc subpackage for
a706a1d
# documentation. However, building the documentation requires python-basemap,
a706a1d
# and python-basemap requires python-matplotlib to build, so we have a
a706a1d
# circular dependence, and so we need to be able to turn off building of the
a706a1d
# documents
a706a1d
%global withdocs 1
a706a1d
25f5d42
Name:           python-matplotlib
eb0ae8e
Version:        1.0.1
c7aa1a0
Release:        9%{?dist}
25f5d42
Summary:        Python plotting library
25f5d42
25f5d42
Group:          Development/Libraries
d539842
License:        Python
25f5d42
URL:            http://sourceforge.net/projects/matplotlib
e8b7d4f
#Modified Sources to remove the one undistributable file
e8b7d4f
#See generate-tarball.sh in fedora cvs repository for logic
eb0ae8e
#sha1sum matplotlib-1.0.1-without-gpc.tar.gz
eb0ae8e
#a8ccbf4c4b9b90c773380cac83e792673837d3de  matplotlib-1.0.1-without-gpc.tar.gz
eb0ae8e
Source0:        matplotlib-%{version}-without-gpc.tar.gz
680c73c
Source1:        http://downloads.sourceforge.net/matplotlib/mpl_sampledata-%{version}.tar.gz
838673b
Source2:        setup.cfg
680c73c
Patch0:         matplotlib-1.0.1-plot_directive.patch
25f5d42
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
25f5d42
25f5d42
BuildRequires:  python-devel, freetype-devel, libpng-devel, zlib-devel
8217450
BuildRequires:  pygtk2-devel, gtk2-devel, tkinter, tk-devel
1437e01
BuildRequires:  pytz, python-dateutil, numpy
5ca800e
Requires:       numpy, pytz, python-dateutil
1887561
Requires:       pycairo >= 1.2.0
7cfd478
Requires:       dejavu-sans-fonts
8217450
25f5d42
%description
25f5d42
Matplotlib is a pure python plotting library with the goal of making
680c73c
publication quality plots using a syntax familiar to Matlab users. The
680c73c
library uses numpy for handling large data sets and supports a variety
680c73c
of output back-ends.
25f5d42
8217450
8217450
%package        tk
8217450
Summary:        Tk backend for python-matplotlib
8217450
Group:          Development/Libraries
06e45f0
Requires:       %{name}%{?_isa} = %{version}-%{release}
8217450
Requires:       tkinter
8217450
8217450
%description    tk
8217450
%{summary}
8217450
fa5fd50
%package        wx
fa5fd50
Summary:        wxPython backend for python-matplotlib
fa5fd50
Group:          Development/Libraries
06e45f0
Requires:       %{name}%{?_isa} = %{version}-%{release}
fa5fd50
Requires:       wxPython
fa5fd50
BuildRequires:  wxPython-devel
fa5fd50
fa5fd50
%description    wx
fa5fd50
%{summary}
fa5fd50
a706a1d
%if %{withdocs}
838673b
%package        doc
838673b
Summary:        Documentation files for python-matplotlib
838673b
Group:          Documentation
06e45f0
Requires:       %{name}%{?_isa} = %{version}-%{release}
680c73c
BuildRequires:  python-sphinx
680c73c
BuildRequires:  tex(latex)
680c73c
BuildRequires:  dvipng
838673b
BuildRequires:  PyQt4
680c73c
BuildRequires:  python-basemap
838673b
# Some of the docs don't build as python-xlwt is needed. However the review
838673b
# request isn't yet complete for this package. See:
838673b
# https://bugzilla.redhat.com/show_bug.cgi?id=613766 
838673b
# BuildRequires: python-xlwt
838673b
838673b
%description    doc
838673b
%{summary}
a706a1d
%endif
8217450
25f5d42
%prep
838673b
%setup -q -n matplotlib-%{version} -b1
fd9734a
%patch0 -p1
bb617de
chmod -x lib/matplotlib/mpl-data/images/*.svg
25f5d42
838673b
# Ensure all example files are non-executable so that the -doc package doesn't
838673b
# drag in dependencies
838673b
find examples -name '*.py' -exec chmod a-x '{}' \;
838673b
0e79a43
# Fix line ending in this example file
0e79a43
sed -i 's/\r//' examples/api/font_family_rc.py
0e79a43
25f5d42
%build
838673b
cp %{SOURCE2} ./setup.cfg
25f5d42
%{__python} setup.py build
25f5d42
838673b
# Build html documentation
a706a1d
%if %{withdocs}
838673b
%global py_ver %(echo `python -c "import sys; sys.stdout.write(sys.version[:3])"`)
838673b
%global sampledatadir %{_builddir}/mpl_sampledata-%{version}
838673b
%global libpath %{_builddir}/matplotlib-%{version}/build/lib.linux-%{_arch}-%{py_ver}
838673b
pushd doc
838673b
echo "examples.download : False" >> matplotlibrc
838673b
echo "examples.directory : %{sampledatadir}" >> matplotlibrc
838673b
# This really does need to be ran twice
838673b
export PYTHONPATH=%{libpath}
f48deec
%{__python} make.py --small html && %{__python} make.py --small html
5141702
rm -f build/html/.buildinfo
5141702
chmod -x build/html/pyplots/make.py
5141702
sed -i 's/\r//' build/html/_sources/devel/add_new_projection.txt
5141702
sed -i 's/\r//' build/html/examples/api/font_family_rc.py
838673b
popd
a706a1d
%endif
838673b
25f5d42
%install
25f5d42
rm -rf $RPM_BUILD_ROOT
df8fffe
%{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT
df8fffe
chmod +x $RPM_BUILD_ROOT%{python_sitearch}/matplotlib/dates.py
0ec477d
rm -rf $RPM_BUILD_ROOT%{python_sitearch}/matplotlib/mpl-data/fonts
25f5d42
25f5d42
%clean
25f5d42
rm -rf $RPM_BUILD_ROOT
25f5d42
df8fffe
%files
25f5d42
%defattr(-,root,root,-)
36a8616
%doc README.txt license/LICENSE license/LICENSE_enthought.txt
df8fffe
%doc license/LICENSE_PAINT license/LICENSE_PIL
0ec477d
%doc CHANGELOG CXX INSTALL INTERACTIVE KNOWN_BUGS
838673b
%doc PKG-INFO TODO
d1a8b70
%if 0%{?fedora} >= 9
d1a8b70
%{python_sitearch}/*egg-info
d1a8b70
%endif
145fd38
%{python_sitearch}/matplotlib/
36a8616
%{python_sitearch}/mpl_toolkits/
145fd38
%{python_sitearch}/pylab.py*
8217450
%exclude %{python_sitearch}/matplotlib/backends/backend_tkagg.*
8217450
%exclude %{python_sitearch}/matplotlib/backends/tkagg.*
8217450
%exclude %{python_sitearch}/matplotlib/backends/_tkagg.so
fa5fd50
%exclude %{python_sitearch}/matplotlib/backends/backend_wx.*
fa5fd50
%exclude %{python_sitearch}/matplotlib/backends/backend_wxagg.*
8217450
8217450
%files tk
eb0ae8e
%defattr(-,root,root,-)
145fd38
%{python_sitearch}/matplotlib/backends/backend_tkagg.py*
145fd38
%{python_sitearch}/matplotlib/backends/tkagg.py*
8217450
%{python_sitearch}/matplotlib/backends/_tkagg.so
25f5d42
fa5fd50
%files wx
fa5fd50
%defattr(-,root,root,-)
fa5fd50
%{python_sitearch}/matplotlib/backends/backend_wx.py*
fa5fd50
%{python_sitearch}/matplotlib/backends/backend_wxagg.py*
fa5fd50
a706a1d
%if %{withdocs}
838673b
%files doc
a48cf83
%defattr(-,root,root,-)
838673b
%doc doc/build/html
838673b
%doc examples
a706a1d
%endif
644f5c0
25f5d42
%changelog
c7aa1a0
* Sat Feb 26 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-9
c7aa1a0
- Bump and rebuild
c7aa1a0
5141702
* Sat Feb 26 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-8
5141702
- Fix spec file typos so package builds
5141702
0e79a43
* Fri Feb 25 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-7
0e79a43
- Remove a debugging echo statement from the spec file
0e79a43
- Fix some line endings and permissions in -doc sub-package
0e79a43
680c73c
* Fri Feb 25 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-6
680c73c
- Spec file cleanups to silence some rpmlint warnings
680c73c
a48cf83
* Mon Feb 21 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-5
a48cf83
- Add default attr to doc sub-package file list
ab40769
- No longer designate -doc subpackage as noarch
06e45f0
- Add arch specific Requires for tk, wx and doc sub-packages
a48cf83
fa5fd50
* Mon Feb 21 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-4
fa5fd50
- Enable wxPython backend
f26192d
- Make -doc sub-package noarch
fa5fd50
a706a1d
* Mon Feb 21 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-3
a706a1d
- Add conditional for optionally building doc sub-package
f48deec
- Add flag to build low res images for documentation
f48deec
- Add matplotlib-1.0.1-plot_directive.patch to fix build of low res images
fd9734a
- Remove unused patches
a706a1d
838673b
* Sat Feb 19 2011 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1.0.1-2
838673b
- Build and package HTML documentation in -doc sub-package
838673b
- Move examples to -doc sub-package
838673b
- Make examples non-executable
838673b
eb0ae8e
* Fri Feb 18 2011 Thomas Spura <tomspur@fedoraproject.org> - 1.0.1-1
eb0ae8e
- update to new bugfix version (#678489)
eb0ae8e
- set file attributes in tk subpackage
eb0ae8e
- filter private *.so
eb0ae8e
7d37cb0
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-3
7d37cb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7d37cb0
3d8aca5
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0.0-2
3d8aca5
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
3d8aca5
e8b7d4f
* Thu Jul 8 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 1.0.0-1
e8b7d4f
- New upstream release  
e8b7d4f
- Remove undistributable file from bundled agg library 
e8b7d4f
8ff61b6
* Thu Jul 1 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.99.3-1
8ff61b6
- New upstream release  
8ff61b6
8e35b28
* Thu May 27 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.99.1.2-4
8e35b28
- Upstream patch to fix deprecated gtk tooltip warning.  
8e35b28
75838bc
* Mon Apr 12 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.99.1.2-2
75838bc
- Bump to rebuild against numpy 1.3  
75838bc
5fb5eb7
* Thu Apr 1 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.99.1.2-1
5fb5eb7
- Bump to rebuild against numpy 1.4.0  
5fb5eb7
1888600
* Fri Dec 11 2009 Jon Ciesla <limb@jcomserv.net> - 0.99.1.2
1888600
- Update to 0.99.1.2
1888600
8e942f9
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.98.5.2-5
8e942f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8e942f9
7cfd478
* Fri Mar 06 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.98.5-4
7cfd478
- Fixed font dep after font guideline change
7cfd478
81520ce
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.98.5.2-3
81520ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
81520ce
3566db3
* Tue Dec 23 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.98.5-2
3566db3
- Add dep on DejaVu Sans font for default font support
3566db3
0ec477d
* Mon Dec 22 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.98.5-1
0ec477d
- Latest upstream release
0ec477d
- Strip out included fonts
0ec477d
9009b11
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.98.3-2
9009b11
- Rebuild for Python 2.6
9009b11
e9f8234
* Wed Aug  6 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.98.3-1
e9f8234
- Latest upstream release
e9f8234
36a8616
* Fri Jul  1 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.98.1-1
36a8616
- Latest upstream release
36a8616
61aa382
* Fri Mar  21 2008 Jef Spaleta <jspaleta[AT]fedoraproject org> - 0.91.2-2
61aa382
- gcc43 cleanups
61aa382
1437e01
* Fri Mar  21 2008 Jef Spaleta <jspaleta[AT]fedoraproject org> - 0.91.2-1
1437e01
- New upstream version
1437e01
- Adding Fedora specific setup.cfg from included template
1437e01
- removed numarry and numerics build requirements
1437e01
4b93d98
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.90.1-6
4b93d98
- Autorebuild for GCC 4.3
4b93d98
1ba7111
* Fri Jan  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.90.1-5
1ba7111
- Fixed typo in spec.
1ba7111
d1a8b70
* Fri Jan  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.90.1-4
d1a8b70
- Support for Python Eggs for F9+
d1a8b70
96119e7
* Thu Jan  3 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.90.1-3
96119e7
- Rebuild for new Tcl 8.5
96119e7
d539842
* Thu Aug 23 2007 Orion Poplawski <orion@cora.nwra.com> 0.90.1-2
d539842
- Update license tag to Python
d539842
- Rebuild for BuildID
d539842
bb617de
* Mon Jun 04 2007 Orion Poplawski <orion@cora.nwra.com> 0.90.1-1
bb617de
- Update to 0.90.1
bb617de
32df714
* Wed Feb 14 2007 Orion Poplawski <orion@cora.nwra.com> 0.90.0-2
32df714
- Rebuild for Tcl/Tk downgrade
32df714
0346b9d
* Sat Feb 10 2007 Jef Spaleta <jspaleta@gmail.com> 0.90.0-2
0346b9d
- Release bump for rebuild against new tk 
0346b9d
5550f6f
* Fri Feb 09 2007 Orion Poplawski <orion@cora.nwra.com> 0.90.0-1
5550f6f
- Update to 0.90.0
5550f6f
a019183
* Tue Jan  5 2007 Orion Poplawski <orion@cora.nwra.com> 0.87.7-4
680c73c
- Add examples to %%docs
a019183
a019183
* Mon Dec 11 2006 Jef Spaleta <jspaleta@gmail.com> 0.87.7-3
f319b1c
- Release bump for rebuild against python 2.5 in devel tree
f319b1c
a019183
* Tue Dec  5 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.7-2
5ca800e
- Force build of gtk/gtkagg backends in mock (bug #218153)
5ca800e
- Change Requires from python-numeric to numpy (bug #218154)
5ca800e
a019183
* Tue Nov 21 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.7-1
4172d14
- Update to 0.87.7 and fix up the defaults to use numpy
4172d14
- Force build of tkagg backend without X server
4172d14
- Use src.rpm from Jef Spaleta, closes bug 216578
4172d14
e197124
* Fri Oct  6 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.6-1
e197124
- Update to 0.87.6
e197124
145fd38
* Thu Sep  7 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.5-1
145fd38
- Update to 0.87.5
145fd38
145fd38
* Thu Jul 27 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.4-1
145fd38
- Update to 0.87.4
145fd38
644f5c0
* Wed Jun  7 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.3-1
644f5c0
- Update to 0.87.3
644f5c0
54692bd
* Mon May 15 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.2-2
54692bd
- Rebuild for new numpy
54692bd
ccda7c8
* Tue Mar  7 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.2-1
ccda7c8
- Update to 0.87.2
ccda7c8
31c351b
* Tue Mar  7 2006 Orion Poplawski <orion@cora.nwra.com> 0.87.1-1
31c351b
- Update to 0.87.1
31c351b
- Add pycairo >= 1.0.2 requires (FC5+ only)
31c351b
8217450
* Fri Feb 24 2006 Orion Poplawski <orion@cora.nwra.com> 0.87-1
8217450
- Update to 0.87
8217450
- Add BR numpy and python-numarray
8217450
- Add patch to keep Numeric as the default numerix package
8217450
- Add BR tkinter and tk-devel for TkInter backend
8217450
- Make separate package for Tk backend
8217450
899948a
* Tue Jan 10 2006 Orion Poplawski <orion@cora.nwra.com> 0.86-1
899948a
- Update to 0.86
899948a
6883dbf
* Thu Dec 22 2005 Orion Poplawski <orion@cora.nwra.com> 0.85-2
6883dbf
- Rebuild
6883dbf
111a53d
* Sun Nov 20 2005 Orion Poplawski <orion@cora.nwra.com> 0.85-1
111a53d
- New upstream version 0.85
111a53d
d22666d
* Mon Sep 19 2005 Orion Poplawski <orion@cora.nwra.com> 0.84-1
d22666d
- New upstream version 0.84
d22666d
4ba8ff1
* Tue Aug 02 2005 Orion Poplawski <orion@cora.nwra.com> 0.83.2-3
4ba8ff1
- bump release 
4ba8ff1
ff18059
* Tue Aug 02 2005 Orion Poplawski <orion@cora.nwra.com> 0.83.2-2
ff18059
- Add Requires: python-numeric, pytz, python-dateutil
ff18059
daf5031
* Fri Jul 29 2005 Orion Poplawski <orion@cora.nwra.com> 0.83.2-1
daf5031
- New upstream version matplotlib 0.83.2
daf5031
634341f
* Thu Jul 28 2005 Orion Poplawski <orion@cora.nwra.com> 0.83.1-2
634341f
- Bump rel to fix botched tag
634341f
87eb208
* Thu Jul 28 2005 Orion Poplawski <orion@cora.nwra.com> 0.83.1-1
87eb208
- New upstream version matplotlib 0.83.1
87eb208
df8fffe
* Tue Jul 05 2005 Orion Poplawski <orion@cora.nwra.com> 0.82-4
df8fffe
- BuildRequires: pytz, python-dateutil - use upstream
df8fffe
- Don't use INSTALLED_FILES, list dirs
df8fffe
- Fix execute permissions
df8fffe
5c67a30
* Fri Jul 01 2005 Orion Poplawski <orion@cora.nwra.com> 0.82-3
f217e72
- Use %%{python_sitearch}
5c67a30
25f5d42
* Thu Jun 30 2005 Orion Poplawski <orion@cora.nwra.com> 0.82-2
25f5d42
- Rename to python-matplotlib
25f5d42
- Remove unneeded Requires: python
680c73c
- Add private directories to %%files
25f5d42
25f5d42
* Tue Jun 28 2005 Orion Poplawski <orion@cora.nwra.com> 0.82-1
25f5d42
- Initial package for Fedora Extras