1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
--- basemap-0.9.4/setup.py.orig 2006-06-07 11:36:02.000000000 -0600
+++ basemap-0.9.4/setup.py 2006-07-03 11:54:16.000000000 -0600
@@ -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:
@@ -21,36 +21,27 @@
deps = glob.glob('src/*.c')
-extensions = [Extension("pyproj",deps,include_dirs = ['src'],)]
+extensions = [Extension("pyproj",['pyproj.c'],libraries=["proj"])]
packages = ['matplotlib.toolkits.basemap']
package_dirs = {'':'lib'}
-# only install shapelib and dbflib if user hasn't got them.
-#try: import shapelib
-#except ImportError: haveshapelib = False
-#else: haveshapelib = True
-#try: import dbflib
-#except ImportError: havedbflib = False
-#else: havedbflib = True
-#if not haveshapelib or not havedbflib:
-# always intall shapelib and dbflib.
+# Always build pyshapelib for RPM consistency, uses system shapelib
if 1:
packages = packages + ['shapelib','dbflib']
package_dirs['shapelib'] ='lib/shapelib'
package_dirs['dbflib'] ='lib/dbflib'
extensions = extensions + \
[Extension("shapelibc",
- ["pyshapelib/shapelib_wrap.c",
- "pyshapelib/shapelib/shpopen.c",
- "pyshapelib/shapelib/shptree.c"],
- include_dirs = ["pyshapelib/shapelib"]),
+ ["pyshapelib/shapelib_wrap.c"],
+ include_dirs = ["/usr/include/libshp"],
+ libraries=["shp"]),
Extension("shptree",
["pyshapelib/shptreemodule.c"],
- include_dirs = ["pyshapelib/shapelib"]),
+ include_dirs = ["/usr/include/libshp"]),
Extension("dbflibc",
- ["pyshapelib/dbflib_wrap.c",
- "pyshapelib/shapelib/dbfopen.c"],
- include_dirs = ["pyshapelib/shapelib"],
+ ["pyshapelib/dbflib_wrap.c"],
+ include_dirs = ["/usr/include/libshp"],
+ libraries = ["shp"],
define_macros = dbf_macros()) ]
if 'setuptools' in sys.modules:
|