]> granicus.if.org Git - python/commitdiff
Issue #18093: Factor out the programs that embed the runtime
authorNick Coghlan <ncoghlan@gmail.com>
Fri, 25 Jul 2014 11:52:14 +0000 (21:52 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Fri, 25 Jul 2014 11:52:14 +0000 (21:52 +1000)
15 files changed:
.gitignore
.hgignore
.hgtouch
Makefile.pre.in
Modules/README [new file with mode: 0644]
Objects/README [new file with mode: 0644]
PCbuild/_freeze_importlib.vcxproj
PCbuild/_freeze_importlib.vcxproj.filters
PCbuild/python.vcxproj
PCbuild/python.vcxproj.filters
Programs/README [new file with mode: 0644]
Programs/_freeze_importlib.c [moved from Modules/_freeze_importlib.c with 100% similarity]
Programs/_testembed.c [moved from Modules/_testembed.c with 100% similarity]
Programs/python.c [moved from Modules/python.c with 100% similarity]
Python/README [new file with mode: 0644]

index 59d383265d43c74372b086970a32f8c09ff187ba..24548705a0d714fc496ff85f5bbe49839e81da10 100644 (file)
@@ -27,8 +27,8 @@ Modules/Setup.config
 Modules/Setup.local
 Modules/config.c
 Modules/ld_so_aix
-Modules/_freeze_importlib
-Modules/_testembed
+Programs/_freeze_importlib
+Programs/_testembed
 PCbuild/*.bsc
 PCbuild/*.dll
 PCbuild/*.exe
index 4dc93c4723245474f9aef80b08262f0194ed4623..562dac96f8370bd1f86a2fdef7e0b324158fedf8 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -89,8 +89,8 @@ Tools/unicode/build/
 Tools/unicode/MAPPINGS/
 BuildLog.htm
 __pycache__
-Modules/_freeze_importlib
-Modules/_testembed
+Programs/_freeze_importlib
+Programs/_testembed
 .coverage
 coverage/
 htmlcov/
index 00efbefa74dec8130bc46783d1721b0dea171657..b9be0f11fdb829f16e9de1921257eb7ee45fac57 100644 (file)
--- a/.hgtouch
+++ b/.hgtouch
@@ -2,7 +2,7 @@
 # Define dependencies of generated files that are checked into hg.
 # The syntax of this file uses make rule dependencies, without actions
 
-Python/importlib.h: Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c
+Python/importlib.h: Lib/importlib/_bootstrap.py Programs/_freeze_importlib.c
 
 Include/opcode.h:  Lib/opcode.py Tools/scripts/generate_opcode_h.py
 
index 43bc8180220391076996664aa6e66ee237f3982f..03875ef9487d5a1c2663363cc18189a52d6a58f1 100644 (file)
@@ -466,7 +466,7 @@ LIBRARY_OBJS=       \
 
 # Default target
 all:           build_all
-build_all:     $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed python-config
+build_all:     $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config
 
 # Compile a binary with gcc profile guided optimization.
 profile-opt:
@@ -539,8 +539,8 @@ clinic: $(BUILDPYTHON)
        $(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make
 
 # Build the interpreter
-$(BUILDPYTHON):        Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-       $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+$(BUILDPYTHON):        Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+       $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
 
 platform: $(BUILDPYTHON) pybuilddir.txt
        $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
@@ -665,18 +665,18 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
                echo "-----------------------------------------------"; \
        fi
 
-Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-       $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+       $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
 
 ############################################################################
 # Importlib
 
-Modules/_freeze_importlib: Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
-       $(LINKCC) $(PY_LDFLAGS) -o $@ Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
+       $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
 
-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c
-       $(MAKE) Modules/_freeze_importlib
-       ./Modules/_freeze_importlib \
+Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib.c
+       $(MAKE) Programs/_freeze_importlib
+       ./Programs/_freeze_importlib \
                $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
 
 
@@ -704,11 +704,11 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
                -DVPATH='"$(VPATH)"' \
                -o $@ $(srcdir)/Modules/getpath.c
 
-Modules/python.o: $(srcdir)/Modules/python.c
-       $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/python.c
+Programs/python.o: $(srcdir)/Programs/python.c
+       $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
 
-Modules/_testembed.o: $(srcdir)/Modules/_testembed.c
-       $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/_testembed.c
+Programs/_testembed.o: $(srcdir)/Programs/_testembed.c
+       $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
 
 Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h
 
@@ -922,7 +922,7 @@ PYTHON_HEADERS= \
                $(PARSER_HEADERS) \
                $(AST_H)
 
-$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
+$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
 
 
 ######################################################################
@@ -1332,7 +1332,7 @@ libainstall:      all python-config
                fi; \
        fi
        $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
-       $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
+       $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
        $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
        $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
        $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
@@ -1343,10 +1343,10 @@ libainstall:    all python-config
        $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
        $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
        $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
-       @if [ -s Modules/python.exp -a \
+       @if [ -s Programs/python.exp -a \
                "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
                echo; echo "Installing support files for building shared extension modules on AIX:"; \
-               $(INSTALL_DATA) Modules/python.exp              \
+               $(INSTALL_DATA) Programs/python.exp             \
                                $(DESTDIR)$(LIBPL)/python.exp;          \
                echo; echo "$(LIBPL)/python.exp";               \
                $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix  \
@@ -1526,7 +1526,7 @@ clean: pycremoval
        find build -name '*.py[co]' -exec rm -f {} ';' || true
        -rm -f pybuilddir.txt
        -rm -f Lib/lib2to3/*Grammar*.pickle
-       -rm -f Modules/_testembed Modules/_freeze_importlib
+       -rm -f Programs/_testembed Programs/_freeze_importlib
 
 profile-removal:
        find . -name '*.gc??' -exec rm -f {} ';'
@@ -1550,7 +1550,7 @@ distclean: clobber
        done
        -rm -f core Makefile Makefile.pre config.status \
                Modules/Setup Modules/Setup.local Modules/Setup.config \
-               Modules/ld_so_aix Modules/python.exp Misc/python.pc
+               Modules/ld_so_aix Programs/python.exp Misc/python.pc
        -rm -f python*-gdb.py
        find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
                                     -o -name '[@,#]*' -o -name '*.old' \
diff --git a/Modules/README b/Modules/README
new file mode 100644 (file)
index 0000000..9b79f53
--- /dev/null
@@ -0,0 +1,2 @@
+Source files for standard library extension modules,
+and former extension modules that are now builtin modules.
diff --git a/Objects/README b/Objects/README
new file mode 100644 (file)
index 0000000..854b103
--- /dev/null
@@ -0,0 +1 @@
+Source files for various builtin objects
index 55197af8b281856b58c6b0da3166a4bd066a202c..e133e020e08811a86b943b2fc821bb0aa0ffb841 100644 (file)
     </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="..\Modules\_freeze_importlib.c" />
+    <ClCompile Include="..\Programs\_freeze_importlib.c" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index 50ec1933f38bad6f779d291cadc231eb596cb1a9..ccad053a9f5362a5e10728a0f02b8d46ade48bf8 100644 (file)
@@ -15,7 +15,7 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\Modules\_freeze_importlib.c">
+    <ClCompile Include="..\Programs\_freeze_importlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
@@ -24,4 +24,4 @@
       <Filter>Source Files</Filter>
     </None>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
index 538734367bada693a0d70733d2d4a1146e315490..6cb4ef5370c2a9826fe1e9e0615198de33553e90 100644 (file)
@@ -510,7 +510,7 @@ echo @"$(OutDir)python$(PyDebugExt).exe" %%*&gt;&gt; "$(SolutionDir)..\python.ba
     <ResourceCompile Include="..\PC\python_exe.rc" />
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\Modules\python.c" />
+    <ClCompile Include="..\Programs\python.c" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="pythoncore.vcxproj">
index e4906a40d7f73015b5c3e87ef800c7c8f91162d5..0662a4e7f5f933841b2dc285bb8596288a32e92a 100644 (file)
@@ -19,8 +19,8 @@
     </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\Modules\python.c">
+    <ClCompile Include="..\Programs\python.c">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/Programs/README b/Programs/README
new file mode 100644 (file)
index 0000000..c24578b
--- /dev/null
@@ -0,0 +1 @@
+Source files for binary executables (as opposed to shared modules)
similarity index 100%
rename from Modules/_testembed.c
rename to Programs/_testembed.c
similarity index 100%
rename from Modules/python.c
rename to Programs/python.c
diff --git a/Python/README b/Python/README
new file mode 100644 (file)
index 0000000..153b628
--- /dev/null
@@ -0,0 +1 @@
+Miscellaneous source files for the main Python shared library