When using the NETCDF_PREFIX environment variable setup.py fails to set netcdf_include and netcdf_lib, which causes the install to fail with the following message:
Traceback (most recent call last):
File "setup.py", line 38, in <module>
config = configuration(top_path='').todict()
File "setup.py", line 30, in configuration
include_dirs=[netcdf_include],
NameError: global name 'netcdf_include' is not defined
Here is a patch to resolve the issue:
--- ./pynetcdf-0.7/setup.py.orig 2008-08-18 14:10:35.000000000 +0400
+++ ./pynetcdf-0.7/setup.py 2008-08-18 14:11:27.000000000 +0400
@@ -21,6 +21,9 @@
print "please set NETCDF_PREFIX to the path where"
print "include/netcdf.h and lib/netcdf.a are located"
print "and re-run the build procedure."
+else:
+ netcdf_include = os.path.join(netcdf_prefix, 'include')
+ netcdf_lib = os.path.join(netcdf_prefix, 'lib')
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
Please look out for line wrapping...
Logged In: NO
Seems like the indenting was lost when I submitted the patch - PLEASE ADD THE APPROPRIATE LINES MANUALLY!!!