diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-01-13 11:47:49 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-01-13 11:47:49 (GMT) |
commit | 8c510e704e3823df66c2c3ad85912c9a9dda7f14 (patch) | |
tree | 0de13fab14e4bef327f2b9083f32d689da9e9349 /setup.py | |
parent | 5c767c2f876a0e9611489033b1be92c566273d6f (diff) | |
download | cpython-8c510e704e3823df66c2c3ad85912c9a9dda7f14.zip cpython-8c510e704e3823df66c2c3ad85912c9a9dda7f14.tar.gz cpython-8c510e704e3823df66c2c3ad85912c9a9dda7f14.tar.bz2 |
Issue #7661: Allow ctypes to be built from a non-ASCII directory path.
Patch by Florent Xicluna.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -813,7 +813,7 @@ class PyBuildExt(build_ext): print "being ignored (4.6.x must be >= 4.6.21)" continue - if ( (not db_ver_inc_map.has_key(db_ver)) and + if ( (db_ver not in db_ver_inc_map) and allow_db_ver(db_ver) ): # save the include directory with the db.h version # (first occurrence only) @@ -1732,17 +1732,18 @@ class PyBuildExt(build_ext): return False fficonfig = {} - execfile(ffi_configfile, globals(), fficonfig) - ffi_srcdir = os.path.join(fficonfig['ffi_srcdir'], 'src') + exec open(ffi_configfile) in fficonfig # Add .S (preprocessed assembly) to C compiler source extensions. self.compiler_obj.src_extensions.append('.S') include_dirs = [os.path.join(ffi_builddir, 'include'), - ffi_builddir, ffi_srcdir] + ffi_builddir, + os.path.join(ffi_srcdir, 'src')] extra_compile_args = fficonfig['ffi_cflags'].split() - ext.sources.extend(fficonfig['ffi_sources']) + ext.sources.extend(os.path.join(ffi_srcdir, f) for f in + fficonfig['ffi_sources']) ext.include_dirs.extend(include_dirs) ext.extra_compile_args.extend(extra_compile_args) return True |