hostpython: add ctypes as hostpython builtin
This commit is contained in:
parent
11f0f9f317
commit
aa3ea83bad
2 changed files with 14 additions and 2 deletions
|
@ -50,3 +50,6 @@ pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Mo
|
|||
|
||||
# Future (used by numpy)
|
||||
future_builtins future_builtins.c
|
||||
|
||||
# ctypes
|
||||
_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c
|
||||
|
|
|
@ -48,11 +48,20 @@ class HostpythonRecipe(Recipe):
|
|||
sdk_path = sh.xcrun("--sdk", "macosx", "--show-sdk-path").strip()
|
||||
build_env = self.ctx.env.copy()
|
||||
build_env["CC"] = "clang -Qunused-arguments -fcolor-diagnostics"
|
||||
build_env["LDFLAGS"] = "-lsqlite3"
|
||||
build_env["CFLAGS"] = "--sysroot={}".format(sdk_path)
|
||||
build_env["LDFLAGS"] = " ".join([
|
||||
"-lsqlite3",
|
||||
"-lffi",
|
||||
"-L{}".format(join(self.ctx.dist_dir, "lib"))
|
||||
])
|
||||
build_env["CFLAGS"] = " ".join([
|
||||
"--sysroot={}".format(sdk_path),
|
||||
"-I{}".format(join(self.ctx.dist_dir, "include", "i386", "libffi"))
|
||||
])
|
||||
configure = sh.Command(join(self.build_dir, "configure"))
|
||||
shprint(configure,
|
||||
"--prefix={}".format(join(self.ctx.dist_dir, "hostpython")),
|
||||
"--disable-toolbox-glue",
|
||||
"--without-gcc",
|
||||
_env=build_env)
|
||||
shprint(sh.make, "-C", self.build_dir, "-j4", "python.exe", "Parser/pgen",
|
||||
_env=build_env)
|
||||
|
|
Loading…
Reference in a new issue