aca5c96
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Orion Poplawski 4a79264
%if 0%{?fedora}
Orion Poplawski 4a79264
%global with_python3 1
Orion Poplawski 4a79264
%else
Orion Poplawski 4a79264
%global with_python3 0
Orion Poplawski 4a79264
%endif
Orion Poplawski 4a79264
aca5c96
aca5c96
Name:           python-basemap
b589798
Version:        1.0.7
ea777e8
Release:        14%{?dist}
aca5c96
Summary:        Plots data on map projections (with continental and political boundaries) 
aca5c96
Group:          Development/Libraries
14ca814
License:        LGPLv2+
54fb614
URL:            http://matplotlib.org/basemap/
c1c9d18
Source0:        http://downloads.sourceforge.net/matplotlib/basemap-%{version}.tar.gz
a154e15
#Source1:        http://dl.sf.net/matplotlib/basemap-%%{version}-examples.tar.gz
dbbc180
#Patch0:         python-basemap-0.99-setup.cfg.patch
dbbc180
#Patch1:         python-basemap-0.99-setup.patch
34e7ce0
Patch2:         python-basemap-1.0.7-datadir.patch
6819dfc
Patch3:         0001-Fix-the-location-of-basemap_datadir.patch
ea777e8
Patch4:         python-basemap-1.0.7-numpy-hstack.patch
aca5c96
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
aca5c96
Caolan McNamara d91ef5b
BuildRequires:  python-devel, proj-devel, shapelib-devel, numpy-f2py, geos-devel 
c1c9d18
BuildRequires:  python-httplib2
c1c9d18
Requires:       python-matplotlib >= 0.98, python-basemap-data
aca5c96
aca5c96
%description
aca5c96
Basemap is a matplotlib toolkit that allows you to plot data on map
3d385fa
projections (with continental and political boundaries).
3d385fa
5c30175
%package -n     python-basemap-examples
5c30175
Summary:        Example programs and data for python-basemap
5c30175
Group:          Development/Libraries
5c30175
License:        Copyright only
5c30175
Requires:       python-basemap
5c30175
5c30175
%description -n python-basemap-examples
5c30175
%{summary}.
aca5c96
Orion Poplawski 4a79264
%if %{with_python3}
b589798
%package -n python3-basemap
b589798
Summary:        Plots data on map projections (with continental and political boundaries)
b589798
Group:          Development/Libraries
b589798
License:        LGPLv2+
b589798
BuildRequires:  python3-devel, proj-devel, shapelib-devel, python3-numpy-f2py, geos-devel
b589798
BuildRequires:  python3-httplib2
b589798
Requires:       python3-matplotlib >= 0.98, python-basemap-data
b589798
b589798
%description -n python3-basemap
b589798
Basemap is a matplotlib toolkit that allows you to plot data on map
b589798
projections (with continental and political boundaries).
Orion Poplawski 4a79264
%endif
b589798
aca5c96
%prep
aca5c96
%setup -q -n basemap-%{version}
dbbc180
#%patch0 -p0
dbbc180
#%patch1 -p0
34e7ce0
%patch2 -p1 -b .
6819dfc
%patch3 -p1 -b .
ea777e8
%patch4 -p1 -b .
14ca814
#Remove the bundled libraries
c1c9d18
#mv src/_pyproj.c src/basemap_pycompat.h .
c1c9d18
#rm -rf src pyshapelib/shapelib
c1c9d18
#rm -rf src goes-2.2.3/
dbbc180
#Remove the data files
dbbc180
rm -rf lib/mpl_toolkits/basemap/data/
aca5c96
ee53442
Orion Poplawski 4a79264
%if %{with_python3}
b589798
rm -rf %{py3dir}
b589798
cp -a . %{py3dir}
Orion Poplawski 4a79264
%endif
b589798
aca5c96
%build
Orion Poplawski 4a79264
%if %{with_python3}
b589798
pushd %{py3dir}
b589798
export GEOS_LIB="/usr/"
b589798
%{__python3} setup.py config
b589798
%{__python3} setup.py build
b589798
popd
Orion Poplawski 4a79264
%endif
b589798
dbbc180
export GEOS_LIB="/usr/"
dbbc180
%{__python} setup.py config
aca5c96
%{__python} setup.py build
aca5c96
aca5c96
aca5c96
%install
aca5c96
rm -rf $RPM_BUILD_ROOT
b589798
Orion Poplawski 4a79264
%if %{with_python3}
b589798
pushd %{py3dir}
b589798
%{__python3} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT
b589798
popd
Orion Poplawski 4a79264
%endif
b589798
aca5c96
%{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT
aca5c96
3d385fa
# We ship the data in another package
3d385fa
rm -rf $RPM_BUILD_ROOT%{_datadir}
3d385fa
aca5c96
aca5c96
%clean
aca5c96
rm -rf $RPM_BUILD_ROOT
aca5c96
aca5c96
aca5c96
%files
4ef963f
%doc Changelog README
bbcedc5
%exclude %{python_sitearch}/mpl_toolkits/__init__.*
bbcedc5
%{python_sitearch}/mpl_toolkits/basemap
a154e15
#%%{python_sitearch}/dbflib/
a154e15
#%%{python_sitearch}/dap/
a154e15
#%%{python_sitearch}/dbflibc.so
a154e15
#%%{python_sitearch}/shapelib/
a154e15
#%%{python_sitearch}/shapelibc.so
a154e15
#%%{python_sitearch}/shptree.so
b4a934a
%{python_sitearch}/*.egg-info
c1c9d18
%{python_sitearch}/_geoslib.so
aca5c96
5c30175
%files -n python-basemap-examples
5c30175
%doc examples/*
5c30175
Orion Poplawski 4a79264
%if %{with_python3}
b589798
%files -n python3-basemap
b589798
%doc Changelog README
b589798
%exclude %{python3_sitearch}/mpl_toolkits/__init__.*
b589798
%{python3_sitearch}/mpl_toolkits/basemap
b589798
%{python3_sitearch}/*.egg-info
a154e15
%{python3_sitearch}/_geoslib.cpython-3*.so
a154e15
%{python3_sitearch}/mpl_toolkits/__pycache__/__init__.cpython-3*.py*
Orion Poplawski 4a79264
%endif
b589798
aca5c96
%changelog
ea777e8
* Fri Dec 09 2016 Jon Ciesla <limburgher@gmail.com> - 1.0.7-14
ea777e8
- Patch for numpy change, BZ 1403159.
ea777e8
Dominik 'Rathann' Mierzejewski 9640751
* Mon Sep 26 2016 Dominik Mierzejewski <rpm@greysector.net> - 1.0.7-13
Dominik 'Rathann' Mierzejewski 9640751
- rebuilt for matplotlib-2.0.0
Dominik 'Rathann' Mierzejewski 9640751
a2177aa
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-12
a2177aa
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
a2177aa
6996802
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-11
6996802
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6996802
a154e15
* Thu Nov 19 2015 Jon Ciesla <limburgher@gmail.com> - 1.0.7-10
a154e15
- Fix Python 3 build.
a154e15
6320c77
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-9
6320c77
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
6320c77
852afbb
* Wed Oct 14 2015 Jon Ciesla <limburgher@gmail.com> - 1.0.7-8
852afbb
- geos rebuild.
852afbb
e4618a7
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-7
e4618a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e4618a7
6819dfc
* Thu Jan 15 2015 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.0.7-6
6819dfc
- Add a patch fixing the location of basemap_datadir
c23ee27
- Replace the sed command that did not work by a patch that does work, fixes
c23ee27
  RHBZ#1177052
c23ee27
ee53442
* Wed Jan 14 2015 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.0.7-5
ee53442
- Fix the location of the datadir. Fixes RHBZ#1177052
ee53442
4a74e08
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-4
4a74e08
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
4a74e08
bbfe464
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-3
bbfe464
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
bbfe464
debdfa8
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.0.7-2
debdfa8
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
debdfa8
b589798
* Thu Mar 13 2014 Jon Ciesla <limburgher@gmail.com> - 1.0.7-1
b589798
- Latest upstream, Python3 support, BZ 1076037.
b589798
- Dropped datadir patch, no longer needed.
b589798
a63cbaf
* Fri Oct 04 2013 Jon Ciesla <limburgher@gmail.com> - 1.0.6-5
a63cbaf
- geos rebuild.
a63cbaf
7158a9a
* Thu Sep 12 2013 Jon Ciesla <limburgher@gmail.com> - 1.0.6-4
7158a9a
- geos rebuild.
7158a9a
8470286
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-3
8470286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8470286
b92262a
* Wed Mar 06 2013 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.0.6-2
b92262a
- Rebuild with new geos.
b92262a
4ef963f
* Mon Feb 04 2013 Jon Ciesla <limburgher@gmail.com> - 1.0.6-1
4ef963f
- Latest upstream, 870640.
4ef963f
254f1b5
* Sun Jan 27 2013 Jon Ciesla <limburgher@gmail.com> - 0.99.4-17
254f1b5
- Rebuild for geos soname bump.
254f1b5
7431f95
* Mon Nov 19 2012 Devrim GÜNDÜZ <devrim@gunduz.org> - 0.99.4-16
7431f95
- Rebuild with newer geos.
7431f95
850026c
* Wed Nov 14 2012 Jon Ciesla <limburgher@gmail.com> - 0.99.4-15
850026c
- Rebuild for geos soname bump.
850026c
0c91a82
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.4-14
0c91a82
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0c91a82
7d74ce8
* Mon Jan 09 2012 Jon Ciesla <limburgher@gmail.com> - 0.99.4-13
7d74ce8
- Rebuild for geos soname bump.
7d74ce8
Jon Ciesla 2b18b07
* Wed Oct 05 2011 Jon Ciesla <limb@jcomserv.net> - 0.99.4-12
Jon Ciesla 2b18b07
- Rebuild for geos soname bump.
Jon Ciesla 2b18b07
Jon Ciesla 5a95fe3
* Fri Jun 03 2011 Jon Ciesla <limb@jcomserv.net> - 0.99.4-11
Jon Ciesla 5a95fe3
- Rebuild for geos soname bump.
Jon Ciesla 5a95fe3
25c1be6
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.4-10
25c1be6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
25c1be6
37ce138
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.99.4-9
37ce138
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
37ce138
78a1f23
* Thu Jun 03 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.99.4-8
78a1f23
- update the homepage url 
78a1f23
5c30175
* Fri May 28 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.99.4-7
5c30175
- Examples is now a subpackage of python-basemap instead of python-basemap-data 
5c30175
0cf29ec
* Mon Apr 12 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.99.4-6
0cf29ec
- Fix the data directory patch. 
0cf29ec
0cf29ec
* Mon Apr 12 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.99.4-5
dec85ca
- Rebuild to for geos soname bump and numpy 1.3 reversion. 
dec85ca
dec85ca
* Thu Apr 01 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.99.4-4
dec85ca
- Added back the data directory patch. It is needed to correctly set the 
dec85ca
  default location of system data files provided by the python-basemap-data 
dec85ca
  package.  Setting the environment variable at build time is not sufficient 
dec85ca
  to set the correct system-wide location for distribution packaging.  
dec85ca
e4eb956
* Thu Apr 01 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.99.4-3
e4eb956
- Rebuild to fix numpy ABI change.
e4eb956
41d2483
* Fri Jan 08 2010 Jon Ciesla <limb@jcomserv.net> - 0.99.4-2
41d2483
- Rebuild for broken dep.
41d2483
d50124c
* Fri Dec 11 2009 Jon Ciesla <limb@jcomserv.net> - 0.99.4-1
d50124c
- Update to latest upstream.
d50124c
- Dropped datadir patch, now handled with environment variable.
d50124c
e53acfe
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.2-5
e53acfe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e53acfe
Caolan McNamara d91ef5b
* Mon Jul 20 2009 Caolán McNamara <caolanm@redhat.com> - 0.99.2-4
Caolan McNamara d91ef5b
- Resolves: rhbz#511576 FTBFS showimg numpy -> numpy-f2py
Caolan McNamara d91ef5b
c2d14f4
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.2-3
c2d14f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c2d14f4
96983a3
* Thu Dec 11 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.99.2-2
96983a3
- Update data directory patch
96983a3
dbbc180
* Thu Dec 11 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.99.2-1
dbbc180
- Update to latest release
dbbc180
931ede1
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.99-6
931ede1
- Rebuild for Python 2.6
931ede1
471cc6c
* Thu Oct 23 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> - 0.99-5
471cc6c
- Also patch runtime GEOS version check (as discussed on the fedora-devel-list)
471cc6c
d048fda
* Sun Oct 19 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.99-4
d048fda
- Update -setup.py patch for geos 3.0.1
d048fda
7e9886b
* Sun Oct 19 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.99-3
7e9886b
- Rebuild for new geos, fixes broken deps
7e9886b
bbcedc5
* Fri Jul 11 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> 0.99-2
bbcedc5
- File conflict fix for Bug 455005
bbcedc5
c1c9d18
* Wed Jul 02 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> 0.99-1
c1c9d18
- Update to match latest matplotlib 
c1c9d18
34ff9e3
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.5-5
34ff9e3
- Autorebuild for GCC 4.3
34ff9e3
b4a934a
* Fri Jan 04 2008 Jef Spaleta <jspaleta@fedoraproject.org> 0.9.5-4
b4a934a
- Fix for egg-info file creation
b4a934a
14ca814
* Thu Aug 23 2007 Orion Poplawski <orion@cora.nwra.com> 0.9.5-3
14ca814
- Explicitly remove included libraries in prep
14ca814
- Update license tag to LGPLv2+
14ca814
- Rebuild for BuildID
14ca814
508842c
* Wed Jun 06 2007 Orion Poplawski <orion@cora.nwra.com> 0.9.5-2
508842c
- Rebuild
508842c
3d385fa
* Fri Mar 23 2007 Orion Poplawski <orion@cora.nwra.com> 0.9.5-1
3d385fa
- Update to 0.9.5
3d385fa
- Ship the examples in a separate rpm
3d385fa
605e220
* Mon Dec 11 2006 Orion Poplawski <orion@cora.nwra.com> 0.9.4-2
605e220
- Remove unnecessary (and damaging) line ending change
605e220
6702d67
* Mon Nov 20 2006 Orion Poplawski <orion@cora.nwra.com> 0.9.4-1
6702d67
- Update to upstream 0.9.4
6702d67
2259128
* Wed Oct 18 2006 Orion Poplawski <orion@cora.nwra.com> 0.9.3-1
2259128
- Update to upstream 0.9.3
2259128
95218d1
* Thu Sep  7 2006 Orion Poplawski <orion@cora.nwra.com> 0.9.2-1
95218d1
- Update to upstream 0.9.2
95218d1
9663ee8
* Fri Jul 28 2006 Orion Poplawski <orion@cora.nwra.com> 0.9.1-1
9663ee8
- Update to upstream 0.9.1
9663ee8
e0e89f7
* Mon Jul  3 2006 Orion Poplawski <orion@cora.nwra.com> 0.9-1
e0e89f7
- Update to upstream 0.9
e0e89f7
f99d680
* Mon Mar  6 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.2-3
f99d680
- Rebuild for updated shapelib
f99d680
b194eea
* Tue Feb 28 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.2-2
b194eea
- python-matplotlib now owns toolkits directoery
b194eea
85f39a8
* Mon Feb 27 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.2-1
85f39a8
- Update to upstream 0.8.2
85f39a8
43dd1bd
* Fri Feb 24 2006 Orion Poplawski <orion@cora.nwra.com> 0.8.1-1
43dd1bd
- Update to upstream 0.8.1
43dd1bd
aca5c96
* Sun Nov 20 2005 Orion Poplawski <orion@cora.nwra.com> 0.7.2.1-1
aca5c96
- Update to upstream 0.7.2.1
aca5c96
- Split into python-basemap and python-basemap-data
aca5c96
- No longer requires python-numarray
aca5c96
- Use system shapelib for pyshapelib components
aca5c96
aca5c96
* Tue Sep 13 2005 Orion Poplawski <orion@cora.nwra.com> 0.6.2-1
aca5c96
- Update to upstream 0.6.2
aca5c96
aca5c96
* Tue Aug 02 2005 Orion Poplawski <orion@cora.nwra.com> 0.5.2-1
aca5c96
- Initial package for Fedora Extras