mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
bpo-45654: Freeze the runpy module and stuff it imports (GH-29903)
This commit is contained in:
parent
dc4a212bd3
commit
44b0e76f2a
7 changed files with 101 additions and 0 deletions
|
@ -53,6 +53,10 @@
|
|||
#include "frozen_modules/os.h"
|
||||
#include "frozen_modules/site.h"
|
||||
#include "frozen_modules/stat.h"
|
||||
#include "frozen_modules/types.h"
|
||||
#include "frozen_modules/importlib.util.h"
|
||||
#include "frozen_modules/importlib.machinery.h"
|
||||
#include "frozen_modules/runpy.h"
|
||||
#include "frozen_modules/__hello__.h"
|
||||
#include "frozen_modules/__phello__.h"
|
||||
#include "frozen_modules/__phello__.ham.h"
|
||||
|
@ -79,6 +83,10 @@ extern PyObject *_Py_get_posixpath_toplevel(void);
|
|||
extern PyObject *_Py_get_os_toplevel(void);
|
||||
extern PyObject *_Py_get_site_toplevel(void);
|
||||
extern PyObject *_Py_get_stat_toplevel(void);
|
||||
extern PyObject *_Py_get_types_toplevel(void);
|
||||
extern PyObject *_Py_get_importlib_util_toplevel(void);
|
||||
extern PyObject *_Py_get_importlib_machinery_toplevel(void);
|
||||
extern PyObject *_Py_get_runpy_toplevel(void);
|
||||
extern PyObject *_Py_get___hello___toplevel(void);
|
||||
extern PyObject *_Py_get___hello___toplevel(void);
|
||||
extern PyObject *_Py_get___hello___toplevel(void);
|
||||
|
@ -116,6 +124,12 @@ static const struct _frozen stdlib_modules[] = {
|
|||
{"os", _Py_M__os, (int)sizeof(_Py_M__os), GET_CODE(os)},
|
||||
{"site", _Py_M__site, (int)sizeof(_Py_M__site), GET_CODE(site)},
|
||||
{"stat", _Py_M__stat, (int)sizeof(_Py_M__stat), GET_CODE(stat)},
|
||||
|
||||
/* runpy - run module with -m */
|
||||
{"types", _Py_M__types, (int)sizeof(_Py_M__types), GET_CODE(types)},
|
||||
{"importlib.util", _Py_M__importlib_util, (int)sizeof(_Py_M__importlib_util), GET_CODE(importlib_util)},
|
||||
{"importlib.machinery", _Py_M__importlib_machinery, (int)sizeof(_Py_M__importlib_machinery), GET_CODE(importlib_machinery)},
|
||||
{"runpy", _Py_M__runpy, (int)sizeof(_Py_M__runpy), GET_CODE(runpy)},
|
||||
{0, 0, 0} /* stdlib sentinel */
|
||||
};
|
||||
static const struct _frozen test_modules[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue