From aca5c96242b061914a948762ab6128dd67898626 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Jan 04 2006 20:29:21 +0000 Subject: auto-import python-basemap-0.7.2.1-1 on branch devel from python-basemap-0.7.2.1-1.src.rpm --- diff --git a/.cvsignore b/.cvsignore index e69de29..be8fceb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +basemap-0.7.2.1.tar.gz diff --git a/python-basemap-0.7.2.1.patch b/python-basemap-0.7.2.1.patch new file mode 100644 index 0000000..233e7f3 --- /dev/null +++ b/python-basemap-0.7.2.1.patch @@ -0,0 +1,66 @@ +--- basemap-0.7.2.1/setup.py.orig 2005-11-18 06:44:22.000000000 -0700 ++++ basemap-0.7.2.1/setup.py 2005-11-20 11:24:20.000000000 -0700 +@@ -11,7 +11,7 @@ + DBFUpdateHeader is available, we scan shapefil.h for the string + 'DBFUpdateHeader'. + """ +- f = open(convert_path("pyshapelib/shapelib/shapefil.h")) ++ f = open(convert_path("/usr/include/libshp//shapefil.h")) + contents = f.read() + f.close() + if contents.find("DBFUpdateHeader") >= 0: +@@ -19,35 +19,30 @@ + else: + return [("HAVE_UPDATE_HEADER", "0")] + +-deps = glob.glob('src/*.c') ++#deps = glob.glob('src/*.c') + +-extensions = [Extension("proj4",deps,include_dirs = ['src'],)] ++extensions = [Extension("proj4",['proj4.c'],libraries=["proj"])] + packages = ['matplotlib/toolkits','matplotlib/toolkits/basemap'] + package_dirs = {'':'lib'} + +-# don't build pyshapelib if it is already installed. ++# Always build pyshapelib for RPM consistency, uses system shapelib + +-try: +- import shapelib +- import dbflib +-except: +- packages = packages + ['shapelib','dbflib'] +- package_dirs['shapelib'] ='pyshapelib/lib/shapelib' +- package_dirs['dbflib'] ='pyshapelib/lib/dbflib' +- extensions = extensions + \ +- [Extension("shapelibc", +- ["pyshapelib/shapelib_wrap.c", +- "pyshapelib/shapelib/shpopen.c", +- "pyshapelib/shapelib/shptree.c"], +- include_dirs = ["pyshapelib/shapelib"]), +- Extension("shptree", +- ["pyshapelib/shptreemodule.c"], +- include_dirs = ["pyshapelib/shapelib"]), +- Extension("dbflibc", +- ["pyshapelib/dbflib_wrap.c", +- "pyshapelib/shapelib/dbfopen.c"], +- include_dirs = ["pyshapelib/shapelib"], +- define_macros = dbf_macros()) ] ++packages = packages + ['shapelib','dbflib'] ++package_dirs['shapelib'] ='pyshapelib/lib/shapelib' ++package_dirs['dbflib'] ='pyshapelib/lib/dbflib' ++extensions = extensions + \ ++ [Extension("shapelibc", ++ ["pyshapelib/shapelib_wrap.c"], ++ include_dirs = ["/usr/include/libshp"], ++ libraries=["shp"]), ++ Extension("shptree", ++ ["pyshapelib/shptreemodule.c"], ++ include_dirs = ["/usr/include/libshp"]), ++ Extension("dbflibc", ++ ["pyshapelib/dbflib_wrap.c"], ++ include_dirs = ["/usr/include/libshp"], ++ libraries = ["shp"], ++ define_macros = dbf_macros()) ] + + setup( + name = "basemap", diff --git a/python-basemap.spec b/python-basemap.spec new file mode 100644 index 0000000..4ab8696 --- /dev/null +++ b/python-basemap.spec @@ -0,0 +1,74 @@ +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +Name: python-basemap +Version: 0.7.2.1 +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.7.2.1.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/proj4.* . +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 +#rm $RPM_BUILD_ROOT%{python_sitearch}/matplotlib/toolkits/__init__.py* + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc Changelog examples/* README LICENSE_pyshapelib +%{python_sitearch}/matplotlib/toolkits/ +#%{python_sitearch}/matplotlib/toolkits/basemap/ +%{python_sitearch}/proj4.so +%{python_sitearch}/dbflib/ +%{python_sitearch}/dbflibc.so +%{python_sitearch}/shapelib/ +%{python_sitearch}/shapelibc.so +%{python_sitearch}/shptree.so + + +%changelog +* Sun Nov 20 2005 Orion Poplawski 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 0.6.2-1 +- Update to upstream 0.6.2 + +* Tue Aug 02 2005 Orion Poplawski 0.5.2-1 +- Initial package for Fedora Extras diff --git a/sources b/sources index e69de29..07bc3d8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +580144218a66e2cb227959f97809f68e basemap-0.7.2.1.tar.gz