Kaydet (Commit) f9182a97 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Merged revisions 77466 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77466 | antoine.pitrou | 2010-01-13 12:47:49 +0100 (mer., 13 janv. 2010) | 5 lines

  Issue #7661: Allow ctypes to be built from a non-ASCII directory path.
  Patch by Florent Xicluna.
........
üst 6c273616
...@@ -167,6 +167,9 @@ Library ...@@ -167,6 +167,9 @@ Library
Build Build
----- -----
- Issue #7661: Allow ctypes to be built from a non-ASCII directory path.
Patch by Florent Xicluna.
- Issue #7589: Only build the nis module when the correct header files are - Issue #7589: Only build the nis module when the correct header files are
found. found.
......
...@@ -28,8 +28,6 @@ ffi_platforms = { ...@@ -28,8 +28,6 @@ ffi_platforms = {
'PA_HPUX': ['src/pa/hpux32.S', 'src/pa/ffi.c'], 'PA_HPUX': ['src/pa/hpux32.S', 'src/pa/ffi.c'],
} }
ffi_srcdir = '@srcdir@'
ffi_sources += ffi_platforms['@TARGET@'] ffi_sources += ffi_platforms['@TARGET@']
ffi_sources = [os.path.join('@srcdir@', f) for f in ffi_sources]
ffi_cflags = '@CFLAGS@' ffi_cflags = '@CFLAGS@'
...@@ -814,7 +814,7 @@ class PyBuildExt(build_ext): ...@@ -814,7 +814,7 @@ class PyBuildExt(build_ext):
print "being ignored (4.6.x must be >= 4.6.21)" print "being ignored (4.6.x must be >= 4.6.21)"
continue 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) ): allow_db_ver(db_ver) ):
# save the include directory with the db.h version # save the include directory with the db.h version
# (first occurrence only) # (first occurrence only)
...@@ -1712,17 +1712,18 @@ class PyBuildExt(build_ext): ...@@ -1712,17 +1712,18 @@ class PyBuildExt(build_ext):
return False return False
fficonfig = {} fficonfig = {}
execfile(ffi_configfile, globals(), fficonfig) exec open(ffi_configfile) in fficonfig
ffi_srcdir = os.path.join(fficonfig['ffi_srcdir'], 'src')
# Add .S (preprocessed assembly) to C compiler source extensions. # Add .S (preprocessed assembly) to C compiler source extensions.
self.compiler.src_extensions.append('.S') self.compiler.src_extensions.append('.S')
include_dirs = [os.path.join(ffi_builddir, 'include'), 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() 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.include_dirs.extend(include_dirs)
ext.extra_compile_args.extend(extra_compile_args) ext.extra_compile_args.extend(extra_compile_args)
return True return True
......
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