Commit 4b54c244 authored by Eric Pellegrini's avatar Eric Pellegrini
Browse files

Bug fix when defining putative for netcdf.h paths

parent be42a8b7
......@@ -11,9 +11,13 @@ from distutils.filelist import FileList, translate_pattern
import distutils.sysconfig
sysconfig = distutils.sysconfig.get_config_vars()
import os, sys, types
import ctypes, ctypes.util
from glob import glob
import ctypes
import ctypes.util
import glob
import os
import site
import sys
import types
class Dummy:
pass
......@@ -41,8 +45,7 @@ python_version = 'python%d.%d' % sys.version_info[:2]
netcdf_h_search_paths = [os.environ.get('NETCDF_HEADER_FILE_PATH', '/tmp/'),
os.path.join(sys.prefix,'include','Scientific'),
os.path.join(sys.prefix,'include',python_version,'Scientific'),
os.path.join(sys.prefix,'local','include',python_version,'Scientific')]
os.path.join(site.USER_BASE,'include',python_version,'Scientific')]
netcdf_h = None
for path in netcdf_h_search_paths:
test_path = os.path.join(path,'netcdf.h')
......@@ -60,7 +63,7 @@ compile_args.append("-DNUMPY=1")
import numpy.distutils.misc_util
include_dirs.extend(numpy.distutils.misc_util.get_numpy_include_dirs())
headers = glob(os.path.join ("Include", "MMTK", "*.h"))
headers = glob.glob(os.path.join ("Include", "MMTK", "*.h"))
paths = [os.path.join('MMTK', 'ForceFields'),
os.path.join('MMTK', 'ForceFields', 'Amber'),
......@@ -74,7 +77,7 @@ paths = [os.path.join('MMTK', 'ForceFields'),
data_files = []
for dir in paths:
files = []
for f in glob(os.path.join(dir, '*')):
for f in glob.glob(os.path.join(dir, '*')):
if f[-3:] != '.py' and f[-4:-1] != '.py' and os.path.isfile(f):
files.append(f)
data_files.append((dir, files))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment