Skip to content

Commit a990838

Browse files
committed
Update setup.py: _geoslib.c
Adding lines back to setup.py I removed too many lines which caused _geoslib.c to not compile.
1 parent 6e11c3c commit a990838

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ def checkversion(GEOS_dir):
8484
namespace_packages = ['mpl_toolkits']
8585
package_dirs = {'':'lib'}
8686

87+
# can't install _geoslib in mpl_toolkits.basemap namespace,
88+
# or Basemap objects won't be pickleable.
89+
90+
# don't use runtime_library_dirs on windows (workaround
91+
# for a distutils bug - http://bugs.python.org/issue2437).
92+
if sys.platform == 'win32':
93+
runtime_lib_dirs = []
94+
else:
95+
runtime_lib_dirs = geos_library_dirs
96+
97+
extensions = [ Extension("_geoslib",['src/_geoslib.c'],
98+
library_dirs=geos_library_dirs,
99+
runtime_library_dirs=runtime_lib_dirs,
100+
include_dirs=geos_include_dirs,
101+
libraries=['geos_c']) ]
102+
87103
# Specify all the required mpl data
88104
# create pyproj binary datum shift grid files.
89105
pathout =\
@@ -129,6 +145,7 @@ def checkversion(GEOS_dir):
129145
packages = packages,
130146
namespace_packages = namespace_packages,
131147
package_dir = package_dirs,
148+
ext_modules = extensions,
132149
cmdclass = {'build_py': build_py},
133150
package_data = package_data
134151
)

0 commit comments

Comments
 (0)