Commit ef284133 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Rename lib_python/ to from_cpython/

Our previous directory names:
include/
lib_python/2.7/
lib_python/2.7_Modules/
lib_python/2.7_Objects/
lib_python/2.7_Python/

new directory names:
from_cpython/Include/
from_cpython/Lib/
from_cpython/Modules/
from_cpython/Objects/
from_cpython/Python/

Sorry for the huge diff, but I think this makes way more sense.
parent 8b12b0a8

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -136,14 +136,14 @@ add_definitions(-DDEFAULT_PYTHON_MAJOR_VERSION=2 -DDEFAULT_PYTHON_MINOR_VERSION= ...@@ -136,14 +136,14 @@ add_definitions(-DDEFAULT_PYTHON_MAJOR_VERSION=2 -DDEFAULT_PYTHON_MINOR_VERSION=
add_definitions(-DLLVMREV=${LLVMREV}) add_definitions(-DLLVMREV=${LLVMREV})
include_directories(${LLVM_INCLUDE_DIRS}) include_directories(${LLVM_INCLUDE_DIRS})
include_directories(include) include_directories(from_cpython/Include)
find_package(LibLZMA REQUIRED) find_package(LibLZMA REQUIRED)
link_directories(${CMAKE_BINARY_DIR}/libunwind/lib) link_directories(${CMAKE_BINARY_DIR}/libunwind/lib)
link_directories(${LLVM_LIBRARY_DIRS}) link_directories(${LLVM_LIBRARY_DIRS})
add_subdirectory(lib_pyston) add_subdirectory(lib_pyston)
add_subdirectory(lib_python) add_subdirectory(from_cpython)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(test/test_extension) add_subdirectory(test/test_extension)
add_subdirectory(test/unittests) add_subdirectory(test/unittests)
...@@ -153,7 +153,7 @@ add_executable(pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYST ...@@ -153,7 +153,7 @@ add_executable(pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYST
# Wrap the stdlib in --whole-archive to force all the symbols to be included and eventually exported # Wrap the stdlib in --whole-archive to force all the symbols to be included and eventually exported
target_link_libraries(pyston -Wl,--whole-archive stdlib -Wl,--no-whole-archive pthread m readline gmp unwind pypa double-conversion ${LLVM_LIBS} ${LIBLZMA_LIBRARIES}) target_link_libraries(pyston -Wl,--whole-archive stdlib -Wl,--no-whole-archive pthread m readline gmp unwind pypa double-conversion ${LLVM_LIBS} ${LIBLZMA_LIBRARIES})
# copy the python standard library (lib_python/2.7) and src/codegen/parse_ast.py to the build directory # copy src/codegen/parse_ast.py to the build directory
add_custom_command(TARGET pyston POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/src/codegen/parse_ast.py ${CMAKE_BINARY_DIR}/src/codegen/parse_ast.py) add_custom_command(TARGET pyston POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/src/codegen/parse_ast.py ${CMAKE_BINARY_DIR}/src/codegen/parse_ast.py)
add_custom_target(astcompare COMMAND ${CMAKE_SOURCE_DIR}/tools/astprint_test.sh add_custom_target(astcompare COMMAND ${CMAKE_SOURCE_DIR}/tools/astprint_test.sh
......
...@@ -142,7 +142,7 @@ LLVM_PROFILE_LIB_DEPS := $(wildcard $(LLVM_BUILD)/Release+Profile/lib/*) ...@@ -142,7 +142,7 @@ LLVM_PROFILE_LIB_DEPS := $(wildcard $(LLVM_BUILD)/Release+Profile/lib/*)
CLANG_EXE := $(LLVM_BIN)/clang CLANG_EXE := $(LLVM_BIN)/clang
CLANGPP_EXE := $(LLVM_BIN)/clang++ CLANGPP_EXE := $(LLVM_BIN)/clang++
COMMON_CFLAGS := -g -Werror -Wreturn-type -Wall -Wno-sign-compare -Wno-unused -Isrc -I./include -fno-omit-frame-pointer COMMON_CFLAGS := -g -Werror -Wreturn-type -Wall -Wno-sign-compare -Wno-unused -Isrc -Ifrom_cpython/Include -fno-omit-frame-pointer
COMMON_CFLAGS += -Wextra -Wno-sign-compare COMMON_CFLAGS += -Wextra -Wno-sign-compare
COMMON_CFLAGS += -Wno-unused-parameter # should use the "unused" attribute COMMON_CFLAGS += -Wno-unused-parameter # should use the "unused" attribute
COMMON_CXXFLAGS := $(COMMON_CFLAGS) COMMON_CXXFLAGS := $(COMMON_CFLAGS)
...@@ -221,7 +221,7 @@ endif ...@@ -221,7 +221,7 @@ endif
CLANGFLAGS := $(CXXFLAGS_DBG) $(CLANG_EXTRA_FLAGS) CLANGFLAGS := $(CXXFLAGS_DBG) $(CLANG_EXTRA_FLAGS)
CLANGFLAGS_RELEASE := $(CXXFLAGS_RELEASE) $(CLANG_EXTRA_FLAGS) CLANGFLAGS_RELEASE := $(CXXFLAGS_RELEASE) $(CLANG_EXTRA_FLAGS)
EXT_CFLAGS := $(COMMON_CFLAGS) -fPIC -Wimplicit -O2 -I../include EXT_CFLAGS := $(COMMON_CFLAGS) -fPIC -Wimplicit -O2 -Ifrom_cpython/Include
EXT_CFLAGS += -Wno-missing-field-initializers EXT_CFLAGS += -Wno-missing-field-initializers
EXT_CFLAGS += -Wno-tautological-compare -Wno-type-limits EXT_CFLAGS += -Wno-tautological-compare -Wno-type-limits
ifneq ($(USE_CLANG),0) ifneq ($(USE_CLANG),0)
...@@ -293,7 +293,7 @@ STDLIB_RELEASE_OBJS := stdlib.release.bc.o ...@@ -293,7 +293,7 @@ STDLIB_RELEASE_OBJS := stdlib.release.bc.o
STDMODULE_SRCS := errnomodule.c shamodule.c sha256module.c sha512module.c _math.c mathmodule.c md5.c md5module.c _randommodule.c _sre.c operator.c binascii.c pwdmodule.c posixmodule.c $(EXTRA_STDMODULE_SRCS) STDMODULE_SRCS := errnomodule.c shamodule.c sha256module.c sha512module.c _math.c mathmodule.c md5.c md5module.c _randommodule.c _sre.c operator.c binascii.c pwdmodule.c posixmodule.c $(EXTRA_STDMODULE_SRCS)
STDOBJECT_SRCS := structseq.c capsule.c stringobject.c $(EXTRA_STDOBJECT_SRCS) STDOBJECT_SRCS := structseq.c capsule.c stringobject.c $(EXTRA_STDOBJECT_SRCS)
STDPYTHON_SRCS := pyctype.c getargs.c formatter_string.c pystrtod.c dtoa.c $(EXTRA_STDPYTHON_SRCS) STDPYTHON_SRCS := pyctype.c getargs.c formatter_string.c pystrtod.c dtoa.c $(EXTRA_STDPYTHON_SRCS)
FROM_CPYTHON_SRCS := $(addprefix lib_python/2.7_Modules/,$(STDMODULE_SRCS)) $(addprefix lib_python/2.7_Objects/,$(STDOBJECT_SRCS)) $(addprefix lib_python/2.7_Python/,$(STDPYTHON_SRCS)) FROM_CPYTHON_SRCS := $(addprefix from_cpython/Modules/,$(STDMODULE_SRCS)) $(addprefix from_cpython/Objects/,$(STDOBJECT_SRCS)) $(addprefix from_cpython/Python/,$(STDPYTHON_SRCS))
# The stdlib objects have slightly longer dependency chains, # The stdlib objects have slightly longer dependency chains,
# so put them first in the list: # so put them first in the list:
...@@ -769,11 +769,11 @@ pyston_release: ...@@ -769,11 +769,11 @@ pyston_release:
ln -sf $(HOME)/pyston-build-release/pyston pyston_release ln -sf $(HOME)/pyston-build-release/pyston pyston_release
endif endif
-include $(wildcard *.d) $(wildcard */*.d) $(wildcard */*/*.d) $(wildcard $(UNITTEST_DIR)/*.d) $(wildcard ./lib_python/2.7_Modules/*.d) -include $(wildcard *.d) $(wildcard */*.d) $(wildcard */*/*.d) $(wildcard $(UNITTEST_DIR)/*.d) $(wildcard ./from_cpython/Modules/*.d)
.PHONY: clean .PHONY: clean
clean: clean:
@ find src $(TOOLS_DIR) $(TEST_DIR) ./lib_python/2.7_Modules \( -name '*.o' -o -name '*.d' -o -name '*.py_cache' -o -name '*.bc' -o -name '*.o.ll' -o -name '*.pub.ll' -o -name '*.cache' -o -name 'stdlib*.ll' -o -name '*.pyc' -o -name '*.so' -o -name '*.a' -o -name '*.expected_cache' -o -name '*.pch' \) -print -delete @ find src $(TOOLS_DIR) $(TEST_DIR) ./from_cpython/Modules \( -name '*.o' -o -name '*.d' -o -name '*.py_cache' -o -name '*.bc' -o -name '*.o.ll' -o -name '*.pub.ll' -o -name '*.cache' -o -name 'stdlib*.ll' -o -name '*.pyc' -o -name '*.so' -o -name '*.a' -o -name '*.expected_cache' -o -name '*.pch' \) -print -delete
@ find \( -name 'pyston*' -executable -type f \) -print -delete @ find \( -name 'pyston*' -executable -type f \) -print -delete
@ find $(TOOLS_DIR) -maxdepth 0 -executable -type f -print -delete @ find $(TOOLS_DIR) -maxdepth 0 -executable -type f -print -delete
@ rm -rf oprofile_data @ rm -rf oprofile_data
...@@ -959,7 +959,7 @@ ifneq ($(SELF_HOST),1) ...@@ -959,7 +959,7 @@ ifneq ($(SELF_HOST),1)
$(TEST_DIR)/test_extension/%.pyston.so: $(TEST_DIR)/test_extension/%.o $(TEST_DIR)/test_extension/%.pyston.so: $(TEST_DIR)/test_extension/%.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro $< -o $@ -g gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro $< -o $@ -g
$(TEST_DIR)/test_extension/%.o: $(TEST_DIR)/test_extension/%.c $(wildcard ./include/*.h) $(TEST_DIR)/test_extension/%.o: $(TEST_DIR)/test_extension/%.c $(wildcard ./include/*.h)
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Wimplicit -I./include -c $< -o $@ gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Wimplicit -Ifrom_cpython/Include -c $< -o $@
else else
# Hax: we want to generate multiple targets from a single rule, and run the rule only if the # Hax: we want to generate multiple targets from a single rule, and run the rule only if the
# dependencies have been updated, and only run it once for all the targets. # dependencies have been updated, and only run it once for all the targets.
...@@ -999,5 +999,5 @@ $(FROM_CPYTHON_SRCS:.c=.release.o): %.release.o: %.c $(BUILD_SYSTEM_DEPS) ...@@ -999,5 +999,5 @@ $(FROM_CPYTHON_SRCS:.c=.release.o): %.release.o: %.c $(BUILD_SYSTEM_DEPS)
$(VERB) $(CC) $(EXT_CFLAGS) -c $< -o $@ -g -MMD -MP -MF $(patsubst %.o,%.d,$@) $(VERB) $(CC) $(EXT_CFLAGS) -c $< -o $@ -g -MMD -MP -MF $(patsubst %.o,%.d,$@)
# These are necessary until we support unicode: # These are necessary until we support unicode:
../lib_python/2.7_Modules/_sre.o: EXT_CFLAGS += -Wno-sometimes-uninitialized ../from_cpython/Modules/_sre.o: EXT_CFLAGS += -Wno-sometimes-uninitialized
../lib_python/2.7_Modules/_sre.release.o: EXT_CFLAGS += -Wno-sometimes-uninitialized ../from_cpython/Modules/_sre.release.o: EXT_CFLAGS += -Wno-sometimes-uninitialized
# Copy any changed stdlib files to the destination: # Copy any changed stdlib files to the destination:
file(GLOB_RECURSE STDLIB_SRCS 2.7/ "*.py") file(GLOB_RECURSE STDLIB_SRCS Lib/ "*.py")
set(STDLIB_TARGETS "") set(STDLIB_TARGETS "")
foreach(STDLIB_FILE ${STDLIB_SRCS}) foreach(STDLIB_FILE ${STDLIB_SRCS})
file(RELATIVE_PATH FN_REL ${CMAKE_SOURCE_DIR} ${STDLIB_FILE}) file(RELATIVE_PATH FN_REL ${CMAKE_SOURCE_DIR} ${STDLIB_FILE})
...@@ -14,14 +14,14 @@ foreach(STDLIB_FILE ${STDLIB_SRCS}) ...@@ -14,14 +14,14 @@ foreach(STDLIB_FILE ${STDLIB_SRCS})
endforeach(STDLIB_FILE) endforeach(STDLIB_FILE)
add_custom_target(copy_stdlib ALL DEPENDS ${STDLIB_TARGETS}) add_custom_target(copy_stdlib ALL DEPENDS ${STDLIB_TARGETS})
# compile specified files in lib_python/2.7_Modules # compile specified files in from_cpython/Modules
file(GLOB_RECURSE STDMODULE_SRCS 2.7_Modules errnomodule.c shamodule.c sha256module.c sha512module.c _math.c mathmodule.c md5.c md5module.c _randommodule.c _sre.c operator.c binascii.c pwdmodule.c posixmodule.c) file(GLOB_RECURSE STDMODULE_SRCS Modules errnomodule.c shamodule.c sha256module.c sha512module.c _math.c mathmodule.c md5.c md5module.c _randommodule.c _sre.c operator.c binascii.c pwdmodule.c posixmodule.c)
# compile specified files in lib_python/2.7_Objects # compile specified files in from_cpython/Objects
file(GLOB_RECURSE STDOBJECT_SRCS 2.7_Objects structseq.c capsule.c stringobject.c) file(GLOB_RECURSE STDOBJECT_SRCS Objects structseq.c capsule.c stringobject.c)
# compile specified files in lib_python/2.7_Python # compile specified files in from_cpython/Python
file(GLOB_RECURSE STDPYTHON_SRCS 2.7_Python getargs.c pyctype.c formatter_string.c pystrtod.c dtoa.c) file(GLOB_RECURSE STDPYTHON_SRCS Python getargs.c pyctype.c formatter_string.c pystrtod.c dtoa.c)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wno-tautological-compare -Wno-type-limits") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers -Wno-tautological-compare -Wno-type-limits")
add_library(FROM_CPYTHON OBJECT ${STDMODULE_SRCS} ${STDOBJECT_SRCS} ${STDPYTHON_SRCS}) add_library(FROM_CPYTHON OBJECT ${STDMODULE_SRCS} ${STDOBJECT_SRCS} ${STDPYTHON_SRCS})
Files in this directory were originally obtained from the CPython mercurial repository, Files in this directory were originally obtained from the CPython mercurial repository,
revision 90928 (2.7.7 release). The "2.7" directory is a copy of the Lib directory, and the revision 90928 (2.7.7 release).
"2.7_Modules" directory is a copy of the Modules directory.
The 2.7_Objects directory contains some of the Objects/ directory.
The 2.7_Python directory contains some of the Python/ directory.
The original code is redistributed under the original license (see main LICENSE file); The original code is redistributed under the original license (see main LICENSE file);
modifications are distributed under the Apache License, Version 2.0 (again, see main LICENSE file). modifications are distributed under the Apache License, Version 2.0 (again, see main LICENSE file).
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