public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-libc Patch 0/1] Python-3.6.8 add support for atexit builtin module
@ 2021-09-14 15:28 Jayaprakash, N
  2021-09-14 15:28 ` [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8 Jayaprakash, N
  0 siblings, 1 reply; 4+ messages in thread
From: Jayaprakash, N @ 2021-09-14 15:28 UTC (permalink / raw)
  To: devel



Jayaprakash Nevara (1):
  AppPkg/Applications/Python/Python-3.6.8: add support for atexit builtin
    module in py 3.6.8

 AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt         | 1 +
 .../Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c            | 2 ++
 AppPkg/Applications/Python/Python-3.6.8/Python368.inf           | 1 +
 3 files changed, 4 insertions(+)

-- 
2.32.0.windows.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8
  2021-09-14 15:28 [edk2-libc Patch 0/1] Python-3.6.8 add support for atexit builtin module Jayaprakash, N
@ 2021-09-14 15:28 ` Jayaprakash, N
  2021-09-15 16:42   ` Jayaprakash, N
  2021-09-15 18:23   ` [edk2-devel] " Rebecca Cran
  0 siblings, 2 replies; 4+ messages in thread
From: Jayaprakash, N @ 2021-09-14 15:28 UTC (permalink / raw)
  To: devel; +Cc: Rebecca Cran, Michael D Kinney, Jayaprakash N

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3626

This commit adds support for the atexit a builtin module
in standard python 3.6.8 to it's UEFI port. There are tools
like Chipsec which are dependent on it but it can be used by
other python scripts running on UEFI shell with the help of
py 3.6.8 interpreter. Tested the changes on IA32 and X64 emulators
and it is working good.

Cc: Rebecca Cran <rebecca@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
---
 AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt         | 1 +
 .../Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c            | 2 ++
 AppPkg/Applications/Python/Python-3.6.8/Python368.inf           | 1 +
 3 files changed, 4 insertions(+)

diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
index 69bb6bd..fb81228 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
+++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
@@ -175,6 +175,7 @@ system as follows:
   _symtable             Modules/symtablemodule.c
   _weakref              Modules/_weakref.c
   array                 Modules/arraymodule.c
+  atexit                Modules/atexitmodule.c
   binascii              Modules/binascii.c
   cmath                 Modules/cmathmodule.c
   datetime              Modules/_datetimemodule.c
diff --git a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
index 4b1eb0f..5ee42d8 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
+++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
@@ -65,6 +65,7 @@ extern PyObject* PyInit__weakref(void);
 extern PyObject* init_winreg(void);
 extern PyObject* PyInit_zlib(void);
 extern PyObject* initbz2(void);
+extern PyObject* PyInit_atexit(void);
 
 extern PyObject* PyMarshal_Init(void);
 extern PyObject* _PyWarnings_Init(void);
@@ -111,6 +112,7 @@ struct _inittab _PyImport_Inittab[] = {
 	{"gc", PyInit_gc},
 	{"math", PyInit_math},
     {"array", PyInit_array},
+    {"atexit", PyInit_atexit},
     {"_datetime", PyInit__datetime},
     {"parser", PyInit_parser},
     {"pyexpat", PyInit_pyexpat},
diff --git a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
index d2e6e73..b98b4a7 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
+++ b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
@@ -215,6 +215,7 @@
   Modules/_io/iobase.c                 #
   Modules/_io/stringio.c               #
   Modules/_io/textio.c                 #
+  Modules/atexitmodule.c	       #
 
 #Modules/cjkcodecs
   Modules/cjkcodecs/multibytecodec.c   #
-- 
2.32.0.windows.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8
  2021-09-14 15:28 ` [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8 Jayaprakash, N
@ 2021-09-15 16:42   ` Jayaprakash, N
  2021-09-15 18:23   ` [edk2-devel] " Rebecca Cran
  1 sibling, 0 replies; 4+ messages in thread
From: Jayaprakash, N @ 2021-09-15 16:42 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Rebecca Cran, Kinney, Michael D

Hi Rebecca,

This another patch submitted to add support for a built-in module "atexit" in Py 3.6.8 UEFI port. 

Would you be able to review and merge this change?

Regards,
JP

-----Original Message-----
From: Jayaprakash, N <n.jayaprakash@intel.com> 
Sent: 14 September 2021 20:58
To: devel@edk2.groups.io
Cc: Rebecca Cran <rebecca@nuviainc.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Jayaprakash, N <n.jayaprakash@intel.com>
Subject: [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3626

This commit adds support for the atexit a builtin module in standard python 3.6.8 to it's UEFI port. There are tools like Chipsec which are dependent on it but it can be used by other python scripts running on UEFI shell with the help of py 3.6.8 interpreter. Tested the changes on IA32 and X64 emulators and it is working good.

Cc: Rebecca Cran <rebecca@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
---
 AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt         | 1 +
 .../Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c            | 2 ++
 AppPkg/Applications/Python/Python-3.6.8/Python368.inf           | 1 +
 3 files changed, 4 insertions(+)

diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
index 69bb6bd..fb81228 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
+++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
@@ -175,6 +175,7 @@ system as follows:
   _symtable             Modules/symtablemodule.c
   _weakref              Modules/_weakref.c
   array                 Modules/arraymodule.c
+  atexit                Modules/atexitmodule.c
   binascii              Modules/binascii.c
   cmath                 Modules/cmathmodule.c
   datetime              Modules/_datetimemodule.c
diff --git a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
index 4b1eb0f..5ee42d8 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
+++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config
+++ .c
@@ -65,6 +65,7 @@ extern PyObject* PyInit__weakref(void);  extern PyObject* init_winreg(void);  extern PyObject* PyInit_zlib(void);  extern PyObject* initbz2(void);
+extern PyObject* PyInit_atexit(void);
 
 extern PyObject* PyMarshal_Init(void);
 extern PyObject* _PyWarnings_Init(void); @@ -111,6 +112,7 @@ struct _inittab _PyImport_Inittab[] = {
 	{"gc", PyInit_gc},
 	{"math", PyInit_math},
     {"array", PyInit_array},
+    {"atexit", PyInit_atexit},
     {"_datetime", PyInit__datetime},
     {"parser", PyInit_parser},
     {"pyexpat", PyInit_pyexpat},
diff --git a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
index d2e6e73..b98b4a7 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
+++ b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
@@ -215,6 +215,7 @@
   Modules/_io/iobase.c                 #
   Modules/_io/stringio.c               #
   Modules/_io/textio.c                 #
+  Modules/atexitmodule.c	       #
 
 #Modules/cjkcodecs
   Modules/cjkcodecs/multibytecodec.c   #
--
2.32.0.windows.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8
  2021-09-14 15:28 ` [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8 Jayaprakash, N
  2021-09-15 16:42   ` Jayaprakash, N
@ 2021-09-15 18:23   ` Rebecca Cran
  1 sibling, 0 replies; 4+ messages in thread
From: Rebecca Cran @ 2021-09-15 18:23 UTC (permalink / raw)
  To: devel, n.jayaprakash; +Cc: Michael D Kinney

Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>


Pushed as 60added7a61075607080ff718d7fa5e764a37044.


-- 
Rebecca Cran


On 9/14/21 9:28 AM, Jayaprakash, N wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3626
>
> This commit adds support for the atexit a builtin module
> in standard python 3.6.8 to it's UEFI port. There are tools
> like Chipsec which are dependent on it but it can be used by
> other python scripts running on UEFI shell with the help of
> py 3.6.8 interpreter. Tested the changes on IA32 and X64 emulators
> and it is working good.
>
> Cc: Rebecca Cran <rebecca@nuviainc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
> ---
>   AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt         | 1 +
>   .../Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c            | 2 ++
>   AppPkg/Applications/Python/Python-3.6.8/Python368.inf           | 1 +
>   3 files changed, 4 insertions(+)
>
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> index 69bb6bd..fb81228 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> @@ -175,6 +175,7 @@ system as follows:
>     _symtable             Modules/symtablemodule.c
>     _weakref              Modules/_weakref.c
>     array                 Modules/arraymodule.c
> +  atexit                Modules/atexitmodule.c
>     binascii              Modules/binascii.c
>     cmath                 Modules/cmathmodule.c
>     datetime              Modules/_datetimemodule.c
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
> index 4b1eb0f..5ee42d8 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
> +++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c
> @@ -65,6 +65,7 @@ extern PyObject* PyInit__weakref(void);
>   extern PyObject* init_winreg(void);
>   extern PyObject* PyInit_zlib(void);
>   extern PyObject* initbz2(void);
> +extern PyObject* PyInit_atexit(void);
>   
>   extern PyObject* PyMarshal_Init(void);
>   extern PyObject* _PyWarnings_Init(void);
> @@ -111,6 +112,7 @@ struct _inittab _PyImport_Inittab[] = {
>   	{"gc", PyInit_gc},
>   	{"math", PyInit_math},
>       {"array", PyInit_array},
> +    {"atexit", PyInit_atexit},
>       {"_datetime", PyInit__datetime},
>       {"parser", PyInit_parser},
>       {"pyexpat", PyInit_pyexpat},
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> index d2e6e73..b98b4a7 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> +++ b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> @@ -215,6 +215,7 @@
>     Modules/_io/iobase.c                 #
>     Modules/_io/stringio.c               #
>     Modules/_io/textio.c                 #
> +  Modules/atexitmodule.c	       #
>   
>   #Modules/cjkcodecs
>     Modules/cjkcodecs/multibytecodec.c   #

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-15 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-14 15:28 [edk2-libc Patch 0/1] Python-3.6.8 add support for atexit builtin module Jayaprakash, N
2021-09-14 15:28 ` [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8 Jayaprakash, N
2021-09-15 16:42   ` Jayaprakash, N
2021-09-15 18:23   ` [edk2-devel] " Rebecca Cran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox