summaryrefslogtreecommitdiff
path: root/AppPkg/Applications/Python/Efi/config.c
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-26 22:04:41 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2012-01-26 22:04:41 +0000
commitb410d6e4ce58c177569d42b51772f7bb239a24a3 (patch)
tree479b6367165e6d14a64d3b9d78deed74aad18485 /AppPkg/Applications/Python/Efi/config.c
parent87bd924782405a4ab605679f47aaefe3b34c7510 (diff)
AppPkg/Applications/Python: Get Python startup process fully working for EDK II.
AppPkg.dsc: Clean up and add Socket support. Applications/Python/PythonCore.inf: Re-order source files. Applications/Python/Efi/config.c: Add all mandatory modules. Disable remaining. Applications/Python/Efi/edk2module.c: EDK II port of posixmodule.c. Applications/Python/Efi/getpath.c: Determine initial module search path. Applications/Python/Ia32/pyconfig.h: Configuration macros for Ia32. Applications/Python/Ipf/pyconfig.h: Configuration macros for Ipf. Applications/Python/PyMod-2.7.2/Include/osdefs.h: Select appropriate directory and path separators for UEFI. Applications/Python/PyMod-2.7.2/Lib/ntpath.py: Allow multi-character device names to left of colon. Applications/Python/PyMod-2.7.2/Lib/os.py: Add edk2 as a supported OS. Applications/Python/PyMod-2.7.2/Lib/site.py: UEFI-specific path and environment setup. Applications/Python/PyMod-2.7.2/Modules/errnomodule.c: Sync with errno.h. Applications/Python/PyMod-2.7.2/Modules/selectmodule.c: Add UEFI support. Applications/Python/PyMod-2.7.2/Modules/socketmodule.h: Add UEFI support. Applications/Python/PyMod-2.7.2/Modules/zlib/zutil.h: Add UEFI support. Applications/Python/PyMod-2.7.2/Python/getcopyright.c: Add Intel copyright. Applications/Python/X64/pyconfig.h: Configuration macros for X64. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten Reviewed-by: lpleahy Reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12957 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'AppPkg/Applications/Python/Efi/config.c')
-rw-r--r--AppPkg/Applications/Python/Efi/config.c100
1 files changed, 49 insertions, 51 deletions
diff --git a/AppPkg/Applications/Python/Efi/config.c b/AppPkg/Applications/Python/Efi/config.c
index 98e7e2a31e..60df9b4dc3 100644
--- a/AppPkg/Applications/Python/Efi/config.c
+++ b/AppPkg/Applications/Python/Efi/config.c
@@ -30,7 +30,7 @@ extern void initimageop(void);
#endif
extern void initmath(void);
extern void init_md5(void);
-extern void initnt(void);
+extern void initedk2(void);
extern void initoperator(void);
extern void initsignal(void);
extern void init_sha(void);
@@ -80,6 +80,9 @@ extern void init_ast(void);
extern void init_io(void);
extern void _PyWarnings_Init(void);
+extern void init_socket(void);
+extern void initselect(void);
+
/* tools/freeze/makeconfig.py marker for additional "extern" */
/* -- ADDMODULE MARKER 1 -- */
@@ -90,37 +93,60 @@ struct _inittab _PyImport_Inittab[] = {
{"array", initarray},
{"_ast", init_ast},
-#ifdef MS_WINDOWS
-#ifndef MS_WINI64
- {"audioop", initaudioop},
-#endif
-#endif
{"binascii", initbinascii},
- //{"cmath", initcmath},
{"errno", initerrno},
-
+ {"future_builtins", initfuture_builtins},
{"gc", initgc},
{"signal", initsignal},
-
-#if 0
- {"future_builtins", initfuture_builtins},
-#ifndef MS_WINI64
- {"imageop", initimageop},
-#endif
+ {"edk2", initedk2},
+ {"operator", initoperator},
+ {"_weakref", init_weakref},
{"math", initmath},
+ {"time", inittime},
+ {"datetime", initdatetime},
+ {"cStringIO", initcStringIO},
+ {"_codecs", init_codecs},
+
+ /* CJK codecs */
+ {"_multibytecodec", init_multibytecodec},
+ {"_codecs_cn", init_codecs_cn},
+ {"_codecs_hk", init_codecs_hk},
+ {"_codecs_iso2022", init_codecs_iso2022},
+ {"_codecs_jp", init_codecs_jp},
+ {"_codecs_kr", init_codecs_kr},
+ {"_codecs_tw", init_codecs_tw},
+
+ {"_bisect", init_bisect},
{"_md5", init_md5},
- //{"nt", initnt}, /* Use the NT os functions, not posix */
- {"operator", initoperator},
{"_sha", init_sha},
{"_sha256", init_sha256},
{"_sha512", init_sha512},
+ {"_random", init_random},
+ {"_heapq", init_heapq},
+ {"itertools", inititertools},
+ {"_collections", init_collections},
+ {"_sre", init_sre},
+ {"parser", initparser},
+ {"_struct", init_struct},
+ {"cPickle", initcPickle},
+
{"strop", initstrop},
- {"time", inittime},
+ {"_functools", init_functools},
+ {"cmath", initcmath},
+ {"_json", init_json},
+
+ {"_socket", init_socket},
+ {"select", initselect},
+
+ {"xxsubtype", initxxsubtype},
+
+#if 0
+#ifndef MS_WINI64
+ {"imageop", initimageop},
+#endif
#ifdef WITH_THREAD
{"thread", initthread},
#endif
- {"cStringIO", initcStringIO},
- {"cPickle", initcPickle},
#ifdef WIN32
{"msvcrt", initmsvcrt},
{"_locale", init_locale},
@@ -128,42 +154,14 @@ struct _inittab _PyImport_Inittab[] = {
/* XXX Should _subprocess go in a WIN32 block? not WIN64? */
//{"_subprocess", init_subprocess},
- {"_codecs", init_codecs},
- //{"_weakref", init_weakref},
//{"_hotshot", init_hotshot},
- {"_random", init_random},
- {"_bisect", init_bisect},
- {"_heapq", init_heapq},
//{"_lsprof", init_lsprof},
- {"itertools", inititertools},
- {"_collections", init_collections},
- {"_symtable", init_symtable},
//{"mmap", initmmap},
- {"_csv", init_csv},
- {"_sre", init_sre},
-#endif
-
- {"parser", initparser},
-
-#if 0
//{"_winreg", init_winreg},
- {"_struct", init_struct},
- {"datetime", initdatetime},
- {"_functools", init_functools},
- {"_json", init_json},
-
- {"xxsubtype", initxxsubtype},
- //{"zipimport", initzipimport},
- //{"zlib", initzlib},
-
- /* CJK codecs */
- {"_multibytecodec", init_multibytecodec},
- {"_codecs_cn", init_codecs_cn},
- {"_codecs_hk", init_codecs_hk},
- {"_codecs_iso2022", init_codecs_iso2022},
- {"_codecs_jp", init_codecs_jp},
- {"_codecs_kr", init_codecs_kr},
- {"_codecs_tw", init_codecs_tw},
+ {"_symtable", init_symtable},
+ {"_csv", init_csv},
+ {"zipimport", initzipimport},
+ {"zlib", initzlib},
#endif
/* tools/freeze/makeconfig.py marker for additional "_inittab" entries */