EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Python Beta Release.
Clean up and clearly differentiate required and optional items in configuration files. Enable the system command and synchronize configuration options between all CPU architectures. Replace the UEFI_ENV macro with UEFI_C_SOURCE to align with Linux and Posix conventions. Update copyrights and versions and make minor cosmetic enhancements to files. Fix compiler-specific build errors. Add Python-specific ReadMe file. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten Reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13119 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -75,43 +75,31 @@ extern void initselect(void);
|
||||
|
||||
extern void PyMarshal_Init(void);
|
||||
extern void initimp(void);
|
||||
extern void initunicodedata(void);
|
||||
extern void init_ctypes(void);
|
||||
|
||||
struct _inittab _PyImport_Inittab[] = {
|
||||
|
||||
//{"_ast", init_ast},
|
||||
//{"_bisect", init_bisect},
|
||||
//{"_codecs", init_codecs},
|
||||
//{"_collections", init_collections},
|
||||
//{"_functools", init_functools},
|
||||
//{"_heapq", init_heapq},
|
||||
//{"_bisect", init_bisect}, /* A fast version of bisect.py */
|
||||
//{"_heapq", init_heapq}, /* A fast version of heapq.py */
|
||||
//{"_io", init_io},
|
||||
//{"_json", init_json},
|
||||
//{"_md5", init_md5},
|
||||
//{"_random", init_random},
|
||||
//{"_sha", init_sha},
|
||||
//{"_sha256", init_sha256},
|
||||
//{"_sha512", init_sha512},
|
||||
//{"_socket", init_socket},
|
||||
//{"_sre", init_sre},
|
||||
//{"_struct", init_struct},
|
||||
//{"_weakref", init_weakref},
|
||||
|
||||
//{"array", initarray},
|
||||
//{"binascii", initbinascii},
|
||||
//{"cmath", initcmath},
|
||||
//{"cPickle", initcPickle},
|
||||
//{"cStringIO", initcStringIO},
|
||||
//{"datetime", initdatetime},
|
||||
//{"future_builtins", initfuture_builtins},
|
||||
//{"gc", initgc},
|
||||
//{"itertools", inititertools},
|
||||
//{"math", initmath},
|
||||
//{"operator", initoperator},
|
||||
//{"parser", initparser},
|
||||
//{"select", initselect},
|
||||
//{"signal", initsignal},
|
||||
//{"strop", initstrop},
|
||||
//{"time", inittime},
|
||||
//{"strop", initstrop}, /* redefines some string operations that are 100-1000 times faster */
|
||||
//{"xxsubtype", initxxsubtype},
|
||||
//{"zipimport", initzipimport},
|
||||
//{"zlib", initzlib},
|
||||
@@ -129,10 +117,24 @@ struct _inittab _PyImport_Inittab[] = {
|
||||
{"thread", initthread},
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
{"_symtable", init_symtable},
|
||||
{"_csv", init_csv},
|
||||
#endif
|
||||
//{"_symtable", init_symtable},
|
||||
//{"_csv", init_csv},
|
||||
|
||||
/* These modules are required for the full built-in help() facility provided by pydoc. */
|
||||
{"_codecs", init_codecs},
|
||||
{"_collections", init_collections},
|
||||
{"_functools", init_functools},
|
||||
{"_random", init_random},
|
||||
{"_sre", init_sre},
|
||||
{"_struct", init_struct}, /* Required by the logging package. */
|
||||
{"_weakref", init_weakref},
|
||||
{"binascii", initbinascii},
|
||||
{"cStringIO", initcStringIO}, /* Required by several modules, such as logging. */
|
||||
{"gc", initgc},
|
||||
{"itertools", inititertools},
|
||||
{"math", initmath},
|
||||
{"operator", initoperator},
|
||||
{"time", inittime},
|
||||
|
||||
/* These four modules should always be built in. */
|
||||
{"edk2", initedk2},
|
||||
|
@@ -2,7 +2,7 @@
|
||||
OS-specific module implementation for EDK II and UEFI.
|
||||
Derived from posixmodule.c in Python 2.7.2.
|
||||
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available under
|
||||
the terms and conditions of the BSD License that accompanies this distribution.
|
||||
The full text of the license may be found at
|
||||
@@ -155,7 +155,7 @@ corresponding Unix manual entries for more information on calls.");
|
||||
/* dummy version. _PyVerify_fd() is already defined in fileobject.h */
|
||||
#define _PyVerify_fd_dup2(A, B) (1)
|
||||
|
||||
#ifndef UEFI_ENV
|
||||
#ifndef UEFI_C_SOURCE
|
||||
/* Return a dictionary corresponding to the POSIX environment table */
|
||||
extern char **environ;
|
||||
|
||||
@@ -196,7 +196,7 @@ convertenviron(void)
|
||||
}
|
||||
return d;
|
||||
}
|
||||
#endif /* UEFI_ENV */
|
||||
#endif /* UEFI_C_SOURCE */
|
||||
|
||||
/* Set a POSIX-specific error from errno, and return NULL */
|
||||
|
||||
@@ -372,7 +372,7 @@ static PyStructSequence_Desc stat_result_desc = {
|
||||
10
|
||||
};
|
||||
|
||||
#ifndef UEFI_ENV /* Not in UEFI */
|
||||
#ifndef UEFI_C_SOURCE /* Not in UEFI */
|
||||
PyDoc_STRVAR(statvfs_result__doc__,
|
||||
"statvfs_result: Result from statvfs or fstatvfs.\n\n\
|
||||
This object may be accessed either as a tuple of\n\
|
||||
@@ -433,7 +433,7 @@ statresult_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
|
||||
|
||||
/* If true, st_?time is float. */
|
||||
#if defined(UEFI_ENV)
|
||||
#if defined(UEFI_C_SOURCE)
|
||||
static int _stat_float_times = 0;
|
||||
#else
|
||||
static int _stat_float_times = 1;
|
||||
@@ -7349,14 +7349,14 @@ INITFUNC(void)
|
||||
if (m == NULL)
|
||||
return;
|
||||
|
||||
#ifndef UEFI_ENV
|
||||
#ifndef UEFI_C_SOURCE
|
||||
/* Initialize environ dictionary */
|
||||
v = convertenviron();
|
||||
Py_XINCREF(v);
|
||||
if (v == NULL || PyModule_AddObject(m, "environ", v) != 0)
|
||||
return;
|
||||
Py_DECREF(v);
|
||||
#endif /* UEFI_ENV */
|
||||
#endif /* UEFI_C_SOURCE */
|
||||
|
||||
if (all_ins(m))
|
||||
return;
|
||||
|
Reference in New Issue
Block a user