Lines 1656-1671
class PyBuildExt(build_ext):
Link Here
|
1656 |
ffi_configfile): |
1656 |
ffi_configfile): |
1657 |
from distutils.dir_util import mkpath |
1657 |
from distutils.dir_util import mkpath |
1658 |
mkpath(ffi_builddir) |
1658 |
mkpath(ffi_builddir) |
1659 |
config_args = [] |
1659 |
config_args = ['--host=%s' % os.environ["CHOST"], ] |
1660 |
|
1660 |
|
1661 |
# Pass empty CFLAGS because we'll just append the resulting |
1661 |
# Pass empty CFLAGS because we'll just append the resulting |
1662 |
# CFLAGS to Python's; -g or -O2 is to be avoided. |
1662 |
# CFLAGS to Python's; -g or -O2 is to be avoided. |
1663 |
cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ |
1663 |
cmd = "(cd %s && aclocal && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ |
1664 |
% (ffi_builddir, ffi_srcdir, " ".join(config_args)) |
1664 |
% (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) |
1665 |
|
1665 |
|
1666 |
res = os.system(cmd) |
1666 |
res = os.system(cmd) |
1667 |
if res or not os.path.exists(ffi_configfile): |
1667 |
if res or not os.path.exists(ffi_configfile): |
1668 |
print "Failed to configure _ctypes module" |
1668 |
print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile ) |
1669 |
return False |
1669 |
return False |
1670 |
|
1670 |
|
1671 |
fficonfig = {} |
1671 |
fficonfig = {} |