]> git.proxmox.com Git - mirror_edk2.git/commitdiff
AppPkg/Applications/Python: Fix a mis-located module and establish the minimum set...
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 27 Jan 2012 01:06:16 +0000 (01:06 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 27 Jan 2012 01:06:16 +0000 (01:06 +0000)
Signed-off-by: darylm503
Reviewed-by: leegrosenbaum
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12958 6f19259b-4bc3-4df7-8a09-765794883524

AppPkg/Applications/Python/Efi/config.c
AppPkg/Applications/Python/PythonCore.inf

index 60df9b4dc30a5bbc4c31bc476507791e24e77070..4d7ae06c018566507b432d289dc532dcfad8615d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Python Module configuration.\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011-2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
 #include "Python.h"\r
 \r
 extern void initarray(void);\r
-#ifndef MS_WINI64\r
-extern void initaudioop(void);\r
-#endif\r
 extern void initbinascii(void);\r
 extern void initcmath(void);\r
 extern void initerrno(void);\r
 extern void initfuture_builtins(void);\r
 extern void initgc(void);\r
-#ifndef MS_WINI64\r
-extern void initimageop(void);\r
-#endif\r
 extern void initmath(void);\r
 extern void init_md5(void);\r
 extern void initedk2(void);\r
@@ -41,10 +35,6 @@ extern void inittime(void);
 extern void initthread(void);\r
 extern void initcStringIO(void);\r
 extern void initcPickle(void);\r
-#ifdef WIN32\r
-extern void initmsvcrt(void);\r
-extern void init_locale(void);\r
-#endif\r
 extern void init_codecs(void);\r
 extern void init_weakref(void);\r
 extern void init_hotshot(void);\r
@@ -83,95 +73,72 @@ extern void _PyWarnings_Init(void);
 extern void init_socket(void);\r
 extern void initselect(void);\r
 \r
-/* tools/freeze/makeconfig.py marker for additional "extern" */\r
-/* -- ADDMODULE MARKER 1 -- */\r
-\r
 extern void PyMarshal_Init(void);\r
 extern void initimp(void);\r
 \r
 struct _inittab _PyImport_Inittab[] = {\r
 \r
-    {"array", initarray},\r
-    {"_ast", init_ast},\r
-    {"binascii", initbinascii},\r
-    {"errno", initerrno},\r
-    {"future_builtins", initfuture_builtins},\r
-    {"gc", initgc},\r
-    {"signal", initsignal},\r
-    {"edk2", initedk2},\r
-    {"operator", initoperator},\r
-    {"_weakref", init_weakref},\r
-    {"math", initmath},\r
-    {"time", inittime},\r
-    {"datetime", initdatetime},\r
-    {"cStringIO", initcStringIO},\r
-    {"_codecs", init_codecs},\r
+    //{"_ast", init_ast},\r
+    //{"_bisect", init_bisect},\r
+    //{"_codecs", init_codecs},\r
+    //{"_collections", init_collections},\r
+    //{"_functools", init_functools},\r
+    //{"_heapq", init_heapq},\r
+    //{"_io", init_io},\r
+    //{"_json", init_json},\r
+    //{"_md5", init_md5},\r
+    //{"_random", init_random},\r
+    //{"_sha", init_sha},\r
+    //{"_sha256", init_sha256},\r
+    //{"_sha512", init_sha512},\r
+    //{"_socket", init_socket},\r
+    //{"_sre", init_sre},\r
+    //{"_struct", init_struct},\r
+    //{"_weakref", init_weakref},\r
+\r
+    //{"array", initarray},\r
+    //{"binascii", initbinascii},\r
+    //{"cmath", initcmath},\r
+    //{"cPickle", initcPickle},\r
+    //{"cStringIO", initcStringIO},\r
+    //{"datetime", initdatetime},\r
+    //{"future_builtins", initfuture_builtins},\r
+    //{"gc", initgc},\r
+    //{"itertools", inititertools},\r
+    //{"math", initmath},\r
+    //{"operator", initoperator},\r
+    //{"parser", initparser},\r
+    //{"select", initselect},\r
+    //{"signal", initsignal},\r
+    //{"strop", initstrop},\r
+    //{"time", inittime},\r
+    //{"xxsubtype", initxxsubtype},\r
+    //{"zipimport", initzipimport},\r
+    //{"zlib", initzlib},\r
 \r
     /* CJK codecs */\r
-    {"_multibytecodec", init_multibytecodec},\r
-    {"_codecs_cn", init_codecs_cn},\r
-    {"_codecs_hk", init_codecs_hk},\r
-    {"_codecs_iso2022", init_codecs_iso2022},\r
-    {"_codecs_jp", init_codecs_jp},\r
-    {"_codecs_kr", init_codecs_kr},\r
-    {"_codecs_tw", init_codecs_tw},\r
-\r
-    {"_bisect", init_bisect},\r
-    {"_md5", init_md5},\r
-    {"_sha", init_sha},\r
-    {"_sha256", init_sha256},\r
-    {"_sha512", init_sha512},\r
-    {"_random", init_random},\r
-    {"_heapq", init_heapq},\r
-    {"itertools", inititertools},\r
-    {"_collections", init_collections},\r
-    {"_sre", init_sre},\r
-    {"parser", initparser},\r
-    {"_struct", init_struct},\r
-    {"cPickle", initcPickle},\r
-\r
-    {"strop", initstrop},\r
-    {"_functools", init_functools},\r
-    {"cmath", initcmath},\r
-    {"_json", init_json},\r
-\r
-    {"_socket", init_socket},\r
-    {"select", initselect},\r
-\r
-    {"xxsubtype", initxxsubtype},\r
+    //{"_multibytecodec", init_multibytecodec},\r
+    //{"_codecs_cn", init_codecs_cn},\r
+    //{"_codecs_hk", init_codecs_hk},\r
+    //{"_codecs_iso2022", init_codecs_iso2022},\r
+    //{"_codecs_jp", init_codecs_jp},\r
+    //{"_codecs_kr", init_codecs_kr},\r
+    //{"_codecs_tw", init_codecs_tw},\r
 \r
-#if 0\r
-#ifndef MS_WINI64\r
-    {"imageop", initimageop},\r
-#endif\r
 #ifdef WITH_THREAD\r
     {"thread", initthread},\r
 #endif\r
-#ifdef WIN32\r
-    {"msvcrt", initmsvcrt},\r
-    {"_locale", init_locale},\r
-#endif\r
-    /* XXX Should _subprocess go in a WIN32 block?  not WIN64? */\r
-    //{"_subprocess", init_subprocess},\r
 \r
-    //{"_hotshot", init_hotshot},\r
-    //{"_lsprof", init_lsprof},\r
-    //{"mmap", initmmap},\r
-    //{"_winreg", init_winreg},\r
+#if 0\r
     {"_symtable", init_symtable},\r
     {"_csv", init_csv},\r
-    {"zipimport", initzipimport},\r
-    {"zlib", initzlib},\r
 #endif\r
 \r
-/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */\r
-/* -- ADDMODULE MARKER 2 -- */\r
-\r
-    /* This module "lives in" with marshal.c */\r
-    {"marshal", PyMarshal_Init},\r
-\r
-    /* This lives in with import.c */\r
-    {"imp", initimp},\r
+    /* These four modules should always be built in. */\r
+    {"edk2", initedk2},\r
+    {"errno", initerrno},\r
+    {"imp", initimp},                   /* We get this for free from Python/import.c  */\r
+    {"marshal", PyMarshal_Init},        /* We get this for free from Python/marshal.c */\r
 \r
     /* These entries are here for sys.builtin_module_names */\r
     {"__main__", NULL},\r
@@ -180,8 +147,6 @@ struct _inittab _PyImport_Inittab[] = {
     {"exceptions", NULL},\r
     {"_warnings", _PyWarnings_Init},\r
 \r
-    {"_io", init_io},\r
-\r
     /* Sentinel */\r
     {0, 0}\r
 };\r
index 28b6e9d59c5782365d6d8a25ddef8ecdb0969f2f..2b101e9003cf4cc9ca5063c454726df1f7790dd8 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # PythonCore.inf\r
 #\r
-#  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2011-2012, Intel Corporation. All rights reserved.<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution. The full text of the license may be found at\r
@@ -64,7 +64,6 @@
 \r
 #Python\r
   PyMod-2.7.2/Python/getcopyright.c\r
-  PyMod-2.7.2/Python/import.c\r
   PyMod-2.7.2/Python/marshal.c\r
 \r
   Python-2.7.2/Python/_warnings.c\r
@@ -87,6 +86,7 @@
   Python-2.7.2/Python/getplatform.c\r
   Python-2.7.2/Python/getversion.c\r
   Python-2.7.2/Python/graminit.c\r
+  Python-2.7.2/Python/import.c\r
   Python-2.7.2/Python/importdl.c\r
   Python-2.7.2/Python/modsupport.c\r
   Python-2.7.2/Python/mysnprintf.c\r
 #  Python-$(PYTHON_VERSION)/Python/thread.c\r
 \r
 #Modules -- See Efi/config.c\r
-  Python-2.7.2/Modules/main.c\r
-  Python-2.7.2/Modules/python.c\r
-  Python-2.7.2/Modules/getbuildinfo.c\r
-\r
   PyMod-2.7.2/Modules/_sre.c\r
   PyMod-2.7.2/Modules/errnomodule.c\r
   PyMod-2.7.2/Modules/selectmodule.c\r
 \r
+  Python-2.7.2/Modules/getbuildinfo.c\r
+  Python-2.7.2/Modules/main.c\r
+  Python-2.7.2/Modules/python.c\r
+\r
   Python-2.7.2/Modules/_bisectmodule.c\r
   Python-2.7.2/Modules/_codecsmodule.c\r
   Python-2.7.2/Modules/_collectionsmodule.c\r
   Python-2.7.2/Modules/timemodule.c\r
   Python-2.7.2/Modules/xxsubtype.c\r
 \r
-#  Python-$(PYTHON_VERSION)/Modules/imageop.c\r
 #  Python-$(PYTHON_VERSION)/Modules/_csv.c\r
 #  Python-$(PYTHON_VERSION)/Modules/symtablemodule.c\r
-#  Python-$(PYTHON_VERSION)/Modules/_hotshot.c\r
 #  Python-$(PYTHON_VERSION)/Modules/_localemodule.c\r
-#  Python-$(PYTHON_VERSION)/Modules/_lsprof.c\r
-#  Python-$(PYTHON_VERSION)/Modules/audioop.c\r
-#  Python-$(PYTHON_VERSION)/Modules/mmapmodule.c\r
 #  Python-$(PYTHON_VERSION)/Modules/rotatingtree.c\r
 #  Python-$(PYTHON_VERSION)/Modules/threadmodule.c\r
 #  Python-$(PYTHON_VERSION)/Modules/zipimport.c\r