rpms/python-basemap/devel python-basemap-0.7.2.1.patch, NONE, 1.1 python-basemap.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Orion Poplawski (orion) fedora-extras-commits at redhat.com
Wed Jan 4 20:29:22 UTC 2006


Author: orion

Update of /cvs/extras/rpms/python-basemap/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14816/devel

Modified Files:
	.cvsignore sources 
Added Files:
	python-basemap-0.7.2.1.patch python-basemap.spec 
Log Message:
auto-import python-basemap-0.7.2.1-1 on branch devel from python-basemap-0.7.2.1-1.src.rpm

python-basemap-0.7.2.1.patch:

--- NEW FILE python-basemap-0.7.2.1.patch ---
--- 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",


--- NEW FILE python-basemap.spec ---
%{!?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 <orion at 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 at cora.nwra.com> 0.6.2-1
- Update to upstream 0.6.2

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


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/python-basemap/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	4 Jan 2006 20:28:06 -0000	1.1
+++ .cvsignore	4 Jan 2006 20:29:21 -0000	1.2
@@ -0,0 +1 @@
+basemap-0.7.2.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/python-basemap/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	4 Jan 2006 20:28:06 -0000	1.1
+++ sources	4 Jan 2006 20:29:21 -0000	1.2
@@ -0,0 +1 @@
+580144218a66e2cb227959f97809f68e  basemap-0.7.2.1.tar.gz




More information about the fedora-extras-commits mailing list