Commit 83e57caa authored by Kevin Modzelewski's avatar Kevin Modzelewski

Get rid of lib_pyston/

The only things left in there were some old stubs.  We had added the stubs and then later
added the real files; with the old directory structure the real files took precedence,
but then with the new structure the stubs took precedence.

Once those were deleted there wasn't anything left in lib_pyston
parent 3f5b4b8e
...@@ -299,7 +299,6 @@ ADD_PROFILE_FLAGS() ...@@ -299,7 +299,6 @@ ADD_PROFILE_FLAGS()
include(sysconfigdata) include(sysconfigdata)
add_subdirectory(lib_pyston)
add_subdirectory(from_cpython) add_subdirectory(from_cpython)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(test/test_extension) add_subdirectory(test/test_extension)
...@@ -351,7 +350,7 @@ add_custom_target(check-format ${CMAKE_SOURCE_DIR}/tools/check_format.sh ${LLVM_ ...@@ -351,7 +350,7 @@ add_custom_target(check-format ${CMAKE_SOURCE_DIR}/tools/check_format.sh ${LLVM_
add_custom_target(lint ${PYTHON_EXE} ${CMAKE_SOURCE_DIR}/tools/lint.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src) add_custom_target(lint ${PYTHON_EXE} ${CMAKE_SOURCE_DIR}/tools/lint.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
# check # check
add_custom_target(check-deps DEPENDS pyston copy_stdlib copy_libpyston clang-format ext_cpython ext_pyston unittests sharedmods) add_custom_target(check-deps DEPENDS pyston copy_stdlib clang-format ext_cpython ext_pyston unittests sharedmods)
add_custom_target(check-pyston COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure DEPENDS check-deps) add_custom_target(check-pyston COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure DEPENDS check-deps)
# {run,dbg,perf,memcheck,memleaks,cachegrind}_TESTNAME # {run,dbg,perf,memcheck,memleaks,cachegrind}_TESTNAME
......
...@@ -654,10 +654,10 @@ CMAKE_SHAREDMODS := sharedmods ext_pyston ...@@ -654,10 +654,10 @@ CMAKE_SHAREDMODS := sharedmods ext_pyston
.PHONY: pyston_dbg pyston_release .PHONY: pyston_dbg pyston_release
pyston_dbg: $(CMAKE_SETUP_DBG) pyston_dbg: $(CMAKE_SETUP_DBG)
$(NINJA) -C $(CMAKE_DIR_DBG) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) $(NINJAFLAGS) $(NINJA) -C $(CMAKE_DIR_DBG) pyston copy_stdlib $(CMAKE_SHAREDMODS) $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_DBG)/pyston $@ ln -sf $(CMAKE_DIR_DBG)/pyston $@
pyston_release: $(CMAKE_SETUP_RELEASE) pyston_release: $(CMAKE_SETUP_RELEASE)
$(NINJA) -C $(CMAKE_DIR_RELEASE) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) $(NINJAFLAGS) $(NINJA) -C $(CMAKE_DIR_RELEASE) pyston copy_stdlib $(CMAKE_SHAREDMODS) $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_RELEASE)/pyston $@ ln -sf $(CMAKE_DIR_RELEASE)/pyston $@
CMAKE_SETUP_GCC := $(CMAKE_DIR_GCC)/build.ninja CMAKE_SETUP_GCC := $(CMAKE_DIR_GCC)/build.ninja
...@@ -667,7 +667,7 @@ $(CMAKE_SETUP_GCC): ...@@ -667,7 +667,7 @@ $(CMAKE_SETUP_GCC):
cd $(CMAKE_DIR_GCC); CC='$(GCC)' CXX='$(GPP)' cmake $(COMMON_CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Debug cd $(CMAKE_DIR_GCC); CC='$(GCC)' CXX='$(GPP)' cmake $(COMMON_CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Debug
.PHONY: pyston_gcc .PHONY: pyston_gcc
pyston_gcc: $(CMAKE_SETUP_GCC) pyston_gcc: $(CMAKE_SETUP_GCC)
$(NINJA) -C $(CMAKE_DIR_GCC) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS) $(NINJA) -C $(CMAKE_DIR_GCC) pyston copy_stdlib $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_GCC)/pyston $@ ln -sf $(CMAKE_DIR_GCC)/pyston $@
CMAKE_SETUP_RELEASE_GCC := $(CMAKE_DIR_RELEASE_GCC)/build.ninja CMAKE_SETUP_RELEASE_GCC := $(CMAKE_DIR_RELEASE_GCC)/build.ninja
...@@ -677,7 +677,7 @@ $(CMAKE_SETUP_RELEASE_GCC): ...@@ -677,7 +677,7 @@ $(CMAKE_SETUP_RELEASE_GCC):
cd $(CMAKE_DIR_RELEASE_GCC); CC='$(GCC)' CXX='$(GPP)' cmake $(COMMON_CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Release cd $(CMAKE_DIR_RELEASE_GCC); CC='$(GCC)' CXX='$(GPP)' cmake $(COMMON_CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Release
.PHONY: pyston_release_gcc .PHONY: pyston_release_gcc
pyston_release_gcc: $(CMAKE_SETUP_RELEASE_GCC) pyston_release_gcc: $(CMAKE_SETUP_RELEASE_GCC)
$(NINJA) -C $(CMAKE_DIR_RELEASE_GCC) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS) $(NINJA) -C $(CMAKE_DIR_RELEASE_GCC) pyston copy_stdlib $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_RELEASE_GCC)/pyston $@ ln -sf $(CMAKE_DIR_RELEASE_GCC)/pyston $@
...@@ -689,7 +689,7 @@ $(CMAKE_SETUP_RELEASE_GCC_PGO): ...@@ -689,7 +689,7 @@ $(CMAKE_SETUP_RELEASE_GCC_PGO):
cd $(CMAKE_DIR_RELEASE_GCC_PGO); CC='$(GCC)' CXX='$(GPP)' cmake $(COMMON_CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Release -DENABLE_PGO=ON -DPROFILE_STATE=use cd $(CMAKE_DIR_RELEASE_GCC_PGO); CC='$(GCC)' CXX='$(GPP)' cmake $(COMMON_CMAKE_OPTIONS) -DCMAKE_BUILD_TYPE=Release -DENABLE_PGO=ON -DPROFILE_STATE=use
.PHONY: pyston_release_gcc_pgo .PHONY: pyston_release_gcc_pgo
pyston_release_gcc_pgo: $(CMAKE_SETUP_RELEASE_GCC_PGO) $(CMAKE_DIR_RELEASE_GCC_PGO)/.trained pyston_release_gcc_pgo: $(CMAKE_SETUP_RELEASE_GCC_PGO) $(CMAKE_DIR_RELEASE_GCC_PGO)/.trained
$(NINJA) -C $(CMAKE_DIR_RELEASE_GCC_PGO) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS) $(NINJA) -C $(CMAKE_DIR_RELEASE_GCC_PGO) pyston copy_stdlib $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_RELEASE_GCC_PGO)/pyston $@ ln -sf $(CMAKE_DIR_RELEASE_GCC_PGO)/pyston $@
CMAKE_SETUP_RELEASE_GCC_PGO_INSTRUMENTED := $(CMAKE_DIR_RELEASE_GCC_PGO_INSTRUMENTED)/build.ninja CMAKE_SETUP_RELEASE_GCC_PGO_INSTRUMENTED := $(CMAKE_DIR_RELEASE_GCC_PGO_INSTRUMENTED)/build.ninja
...@@ -700,7 +700,7 @@ $(CMAKE_SETUP_RELEASE_GCC_PGO_INSTRUMENTED): ...@@ -700,7 +700,7 @@ $(CMAKE_SETUP_RELEASE_GCC_PGO_INSTRUMENTED):
.PHONY: pyston_release_gcc_pgo_instrumented .PHONY: pyston_release_gcc_pgo_instrumented
pyston_release_gcc_pgo_instrumented: $(CMAKE_SETUP_RELEASE_GCC_PGO_INSTRUMENTED) pyston_release_gcc_pgo_instrumented: $(CMAKE_SETUP_RELEASE_GCC_PGO_INSTRUMENTED)
$(NINJA) -C $(CMAKE_DIR_RELEASE_GCC_PGO_INSTRUMENTED) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS) $(NINJA) -C $(CMAKE_DIR_RELEASE_GCC_PGO_INSTRUMENTED) pyston copy_stdlib $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_RELEASE_GCC_PGO_INSTRUMENTED)/pyston $@ ln -sf $(CMAKE_DIR_RELEASE_GCC_PGO_INSTRUMENTED)/pyston $@
PROFILE_TARGET := ./pyston $(SRC_DIR)/minibenchmarks/combined.py PROFILE_TARGET := ./pyston $(SRC_DIR)/minibenchmarks/combined.py
......
...@@ -8,7 +8,7 @@ if (${ENABLE_REF_DEBUG}) ...@@ -8,7 +8,7 @@ if (${ENABLE_REF_DEBUG})
set(EXT_BUILD_FLAGS "-DPy_REF_DEBUG -DPYMALLOC_DEBUG -DPy_TRACE_REFS ${EXT_BUILD_FLAGS}") set(EXT_BUILD_FLAGS "-DPy_REF_DEBUG -DPYMALLOC_DEBUG -DPy_TRACE_REFS ${EXT_BUILD_FLAGS}")
endif() endif()
configure_file(lib_pyston/_sysconfigdata.py.in lib/python2.7/_sysconfigdata.py) configure_file(cmake/_sysconfigdata.py.in lib/python2.7/_sysconfigdata.py)
# CMake sucks: it has no idea that configure-generated files can be installed. # CMake sucks: it has no idea that configure-generated files can be installed.
# Just tell it to install whatever file is at that particular location, and rely on # Just tell it to install whatever file is at that particular location, and rely on
......
...@@ -180,7 +180,6 @@ add_custom_command(OUTPUT ${STDMODULES} ...@@ -180,7 +180,6 @@ add_custom_command(OUTPUT ${STDMODULES}
DEPENDS DEPENDS
pyston pyston
copy_stdlib copy_stdlib
copy_libpyston
Modules/_multiprocessing/multiprocessing.c Modules/_multiprocessing/multiprocessing.c
Modules/_multiprocessing/semaphore.c Modules/_multiprocessing/semaphore.c
Modules/_multiprocessing/socket_connection.c Modules/_multiprocessing/socket_connection.c
......
# Copy any changed lib_pyston sources:
file(GLOB_RECURSE LIBPYSTON_SRCS . "*.py")
set(LIBPYSTON_TARGETS "")
foreach(STDLIB_FILE ${LIBPYSTON_SRCS})
file(RELATIVE_PATH FN_REL ${CMAKE_SOURCE_DIR}/lib_pyston ${STDLIB_FILE})
set(TARGET ${CMAKE_BINARY_DIR}/lib/python2.7/${FN_REL})
add_custom_command(OUTPUT ${TARGET} COMMAND
${CMAKE_COMMAND} -E copy_if_different ${STDLIB_FILE} ${TARGET}
DEPENDS ${STDLIB_FILE}
COMMENT "Copying ${FN_REL}"
)
set(LIBPYSTON_TARGETS ${LIBPYSTON_TARGETS} ${TARGET})
endforeach(STDLIB_FILE)
add_custom_target(copy_libpyston ALL DEPENDS ${LIBPYSTON_TARGETS})
install(FILES ${LIBPYSTON_SRCS} DESTINATION lib/python2.7)
# Very simple stub for the marshal module.
# - pickle imports marshal
def loads(*args, **kw):
raise NotImplementedError()
...@@ -5,7 +5,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build/lib.linux-x86_64-2.7 ...@@ -5,7 +5,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build/lib.linux-x86_64-2.7
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/basic_test.pyston.so add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/basic_test.pyston.so
COMMAND ${CMAKE_BINARY_DIR}/pyston setup.py build --build-lib ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_BINARY_DIR}/pyston setup.py build --build-lib ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS pyston copy_stdlib copy_libpyston basic_test.c descr_test.c slots_test.c type_test.c api_test.c DEPENDS pyston copy_stdlib basic_test.c descr_test.c slots_test.c type_test.c api_test.c
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_target(ext_cpython DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/build/lib.linux-x86_64-2.7/basic_test.so) add_custom_target(ext_cpython DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/build/lib.linux-x86_64-2.7/basic_test.so)
......
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