diff --git a/.gitignore b/.gitignore index 7ddafe6..fca38c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ basemap-0.99.4.tar.gz basemap-0.99.4-examples.tar.gz /basemap-1.0.6.tar.gz +/basemap-1.0.7.tar.gz diff --git a/python-basemap.spec b/python-basemap.spec index 8603510..3703bfe 100644 --- a/python-basemap.spec +++ b/python-basemap.spec @@ -1,8 +1,8 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-basemap -Version: 1.0.6 -Release: 5%{?dist} +Version: 1.0.7 +Release: 1%{?dist} Summary: Plots data on map projections (with continental and political boundaries) Group: Development/Libraries License: LGPLv2+ @@ -11,7 +11,7 @@ Source0: http://downloads.sourceforge.net/matplotlib/basemap-%{version}.t #Source1: http://dl.sf.net/matplotlib/basemap-%{version}-examples.tar.gz #Patch0: python-basemap-0.99-setup.cfg.patch #Patch1: python-basemap-0.99-setup.patch -Patch2: python-basemap-1.0.6-datadir.patch +#Patch2: python-basemap-1.0.6-datadir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel, proj-devel, shapelib-devel, numpy-f2py, geos-devel @@ -31,11 +31,23 @@ Requires: python-basemap %description -n python-basemap-examples %{summary}. +%package -n python3-basemap +Summary: Plots data on map projections (with continental and political boundaries) +Group: Development/Libraries +License: LGPLv2+ +BuildRequires: python3-devel, proj-devel, shapelib-devel, python3-numpy-f2py, geos-devel +BuildRequires: python3-httplib2 +Requires: python3-matplotlib >= 0.98, python-basemap-data + +%description -n python3-basemap +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 -p0 #%patch1 -p0 -%patch2 -p1 +#%patch2 -p1 #Remove the bundled libraries #mv src/_pyproj.c src/basemap_pycompat.h . #rm -rf src pyshapelib/shapelib @@ -43,7 +55,16 @@ Requires: python-basemap #Remove the data files rm -rf lib/mpl_toolkits/basemap/data/ +rm -rf %{py3dir} +cp -a . %{py3dir} + %build +pushd %{py3dir} +export GEOS_LIB="/usr/" +%{__python3} setup.py config +%{__python3} setup.py build +popd + export GEOS_LIB="/usr/" %{__python} setup.py config %{__python} setup.py build @@ -51,6 +72,11 @@ export GEOS_LIB="/usr/" %install rm -rf $RPM_BUILD_ROOT + +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT +popd + %{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT # We ship the data in another package @@ -79,7 +105,19 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc examples/* +%files -n python3-basemap +%doc Changelog README +%exclude %{python3_sitearch}/mpl_toolkits/__init__.* +%{python3_sitearch}/mpl_toolkits/basemap +%{python3_sitearch}/*.egg-info +%{python3_sitearch}/_geoslib.cpython-33m.so +%{python3_sitearch}/mpl_toolkits/__pycache__/__init__.cpython-33.py* + %changelog +* Thu Mar 13 2014 Jon Ciesla - 1.0.7-1 +- Latest upstream, Python3 support, BZ 1076037. +- Dropped datadir patch, no longer needed. + * Fri Oct 04 2013 Jon Ciesla - 1.0.6-5 - geos rebuild. diff --git a/sources b/sources index 5fc13f6..e474103 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fc71c96c76eb8208cafce84d6532ee1b basemap-1.0.6.tar.gz +48c0557ced9e2c6e440b28b3caff2de8 basemap-1.0.7.tar.gz