Commit 56579145 authored by Boxiang Sun's avatar Boxiang Sun

enable future builtin module

parent 8ffb67ac
......@@ -1194,7 +1194,7 @@ TEST_EXT_MODULE_NAMES := basic_test descr_test slots_test
TEST_EXT_MODULE_SRCS := $(TEST_EXT_MODULE_NAMES:%=test/test_extension/%.c)
TEST_EXT_MODULE_OBJS := $(TEST_EXT_MODULE_NAMES:%=test/test_extension/%.pyston.so)
SHAREDMODS_NAMES := _multiprocessing pyexpat
SHAREDMODS_NAMES := _multiprocessing pyexpat future_builtins
SHAREDMODS_SRCS := \
_multiprocessing/multiprocessing.c \
_multiprocessing/semaphore.c \
......@@ -1205,7 +1205,8 @@ SHAREDMODS_SRCS := \
expat/xmltok_impl.c \
expat/xmltok_ns.c \
pyexpat.c \
_elementtree.c
_elementtree.c\
future_builtins.c
SHAREDMODS_SRCS := $(SHAREDMODS_SRCS:%=from_cpython/Modules/%)
SHAREDMODS_OBJS := $(SHAREDMODS_NAMES:%=lib_pyston/%.pyston.so)
......
......@@ -40,6 +40,7 @@ file(GLOB_RECURSE STDMODULE_SRCS Modules
errnomodule.c
fcntlmodule.c
fileio.c
future_builtins.c
getpath.c
iobase.c
itertoolsmodule.c
......@@ -114,6 +115,7 @@ add_library(FROM_CPYTHON OBJECT ${STDMODULE_SRCS} ${STDOBJECT_SRCS} ${STDPYTHON_
add_dependencies(FROM_CPYTHON copy_stdlib)
add_custom_command(OUTPUT
${CMAKE_BINARY_DIR}/lib_pyston/future_builtins.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/_multiprocessing.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/pyexpat.pyston.so
${CMAKE_BINARY_DIR}/lib_pyston/_elementtree.pyston.so
......@@ -141,6 +143,7 @@ add_custom_command(OUTPUT
Modules/expat/xmltok_impl.c
Modules/expat/xmltok_ns.c
Modules/pyexpat.c
Modules/future_builtins.c
Modules/_elementtree.c
Modules/bz2module.c
Modules/grpmodule.c
......
......@@ -17,6 +17,12 @@ def unique(f):
return cache[0]
return wrapper
@unique
def future_builtins_ext():
return Extension("future_builtins", sources = map(relpath, [
"Modules/future_builtins.c",
]))
@unique
def multiprocessing_ext():
return Extension("_multiprocessing", sources = map(relpath, [
......@@ -115,7 +121,8 @@ def elementtree_ext():
sources = [relpath('Modules/_elementtree.c')],
depends = pyexpat.depends,
)
ext_modules = [multiprocessing_ext(),
ext_modules = [future_builtins_ext(),
multiprocessing_ext(),
pyexpat_ext(),
elementtree_ext(),
bz2_ext(),
......
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