Blob Blame History Raw
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           python-basemap
Version:        0.9
Release:        1%{?dist}
Summary:        Plots data on map projections (with continental and political boundaries) 
Group:          Development/Libraries
License:        MIT and GPL
URL:            http://matplotlib.sourceforge.net/matplotlib.toolkits.basemap.basemap.html
Source0:        http://dl.sf.net/matplotlib/basemap-%{version}.tar.gz
Patch0:         python-basemap-0.9.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel, proj-devel, shapelib-devel
Requires:       python-matplotlib >= 0.81, python-basemap-data

%description
Basemap is a matplotlib toolkit that allows you to plot data on map
 projections (with continental and political boundaries)

%prep
%setup -q -n basemap-%{version}
%patch0 -p1 -b .orig

#We are going to use the system proj4 library
mv src/pyproj.* .
rm -rf src

#Avoid name conflict
mv examples/README examples/README.examples

#Cleanup line endings
sed -i 's/\r$//' examples/*


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Changelog examples/* README LICENSE_pyshapelib
%{python_sitearch}/matplotlib/toolkits/basemap/
%{python_sitearch}/pyproj.so
%{python_sitearch}/dbflib/
%{python_sitearch}/dbflibc.so
%{python_sitearch}/shapelib/
%{python_sitearch}/shapelibc.so
%{python_sitearch}/shptree.so
%{_datadir}/basemap/


%changelog
* Mon Jul  3 2006 Orion Poplawski <orion@cora.nwra.com> 0.9-1
- Update to upstream 0.9

* Mon Mar  6 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.2-3
- Rebuild for updated shapelib

* Tue Feb 28 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.2-2
- python-matplotlib now owns toolkits directoery

* Mon Feb 27 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.2-1
- Update to upstream 0.8.2

* Fri Feb 24 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.1-1
- Update to upstream 0.8.1

* Sun Nov 20 2005 Orion Poplawski <orion@cora.nwra.com> 0.7.2.1-1
- Update to upstream 0.7.2.1
- Split into python-basemap and python-basemap-data
- No longer requires python-numarray
- Use system shapelib for pyshapelib components

* Tue Sep 13 2005 Orion Poplawski <orion@cora.nwra.com> 0.6.2-1
- Update to upstream 0.6.2

* Tue Aug 02 2005 Orion Poplawski <orion@cora.nwra.com> 0.5.2-1
- Initial package for Fedora Extras