summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Python/frozen.c
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-03-05 10:40:59 +0100
committerGitHub <[email protected]>2024-03-05 12:40:59 +0300
commit1ac13c847b5358faba44dbb638a828e24369467b (patch)
tree07672b4dd3604ad3dee540a02c6494cb7d10dc3d /contrib/tools/python3/src/Python/frozen.c
parentffcca3e7f7958ddc6487b91d3df8c01054bd0638 (diff)
Library import 16 (#2433)
Co-authored-by: robot-piglet <[email protected]> Co-authored-by: deshevoy <[email protected]> Co-authored-by: robot-contrib <[email protected]> Co-authored-by: thegeorg <[email protected]> Co-authored-by: robot-ya-builder <[email protected]> Co-authored-by: svidyuk <[email protected]> Co-authored-by: shadchin <[email protected]> Co-authored-by: robot-ratatosk <[email protected]> Co-authored-by: innokentii <[email protected]> Co-authored-by: arkady-e1ppa <[email protected]> Co-authored-by: snermolaev <[email protected]> Co-authored-by: dimdim11 <[email protected]> Co-authored-by: kickbutt <[email protected]> Co-authored-by: abdullinsaid <[email protected]> Co-authored-by: korsunandrei <[email protected]> Co-authored-by: petrk <[email protected]> Co-authored-by: miroslav2 <[email protected]> Co-authored-by: serjflint <[email protected]> Co-authored-by: akhropov <[email protected]> Co-authored-by: prettyboy <[email protected]> Co-authored-by: ilikepugs <[email protected]> Co-authored-by: hiddenpath <[email protected]> Co-authored-by: mikhnenko <[email protected]> Co-authored-by: spreis <[email protected]> Co-authored-by: andreyshspb <[email protected]> Co-authored-by: dimaandreev <[email protected]> Co-authored-by: rashid <[email protected]> Co-authored-by: robot-ydb-importer <[email protected]> Co-authored-by: r-vetrov <[email protected]> Co-authored-by: ypodlesov <[email protected]> Co-authored-by: zaverden <[email protected]> Co-authored-by: vpozdyayev <[email protected]> Co-authored-by: robot-cozmo <[email protected]> Co-authored-by: v-korovin <[email protected]> Co-authored-by: arikon <[email protected]> Co-authored-by: khoden <[email protected]> Co-authored-by: psydmm <[email protected]> Co-authored-by: robot-javacom <[email protected]> Co-authored-by: dtorilov <[email protected]> Co-authored-by: sennikovmv <[email protected]> Co-authored-by: hcpp <[email protected]>
Diffstat (limited to 'contrib/tools/python3/src/Python/frozen.c')
-rw-r--r--contrib/tools/python3/src/Python/frozen.c162
1 files changed, 0 insertions, 162 deletions
diff --git a/contrib/tools/python3/src/Python/frozen.c b/contrib/tools/python3/src/Python/frozen.c
deleted file mode 100644
index f8e0b8b065a..00000000000
--- a/contrib/tools/python3/src/Python/frozen.c
+++ /dev/null
@@ -1,162 +0,0 @@
-
-/* Frozen modules initializer
- *
- * Frozen modules are written to header files by Programs/_freeze_module.
- * These files are typically put in Python/frozen_modules/. Each holds
- * an array of bytes named "_Py_M__<module>", which is used below.
- *
- * These files must be regenerated any time the corresponding .pyc
- * file would change (including with changes to the compiler, bytecode
- * format, marshal format). This can be done with "make regen-frozen".
- * That make target just runs Tools/build/freeze_modules.py.
- *
- * The freeze_modules.py script also determines which modules get
- * frozen. Update the list at the top of the script to add, remove,
- * or modify the target modules. Then run the script
- * (or run "make regen-frozen").
- *
- * The script does the following:
- *
- * 1. run Programs/_freeze_module on the target modules
- * 2. update the includes and _PyImport_FrozenModules[] in this file
- * 3. update the FROZEN_FILES variable in Makefile.pre.in
- * 4. update the per-module targets in Makefile.pre.in
- * 5. update the lists of modules in PCbuild/_freeze_module.vcxproj and
- * PCbuild/_freeze_module.vcxproj.filters
- *
- * (Note that most of the data in this file is auto-generated by the script.)
- *
- * Those steps can also be done manually, though this is not recommended.
- * Expect such manual changes to be removed the next time
- * freeze_modules.py runs.
- * */
-
-/* In order to test the support for frozen modules, by default we
- define some simple frozen modules: __hello__, __phello__ (a package),
- and __phello__.spam. Loading any will print some famous words... */
-
-#include "Python.h"
-#include "pycore_import.h"
-
-#include <stdbool.h>
-
-/* Includes for frozen modules: */
-#include "frozen_modules/importlib._bootstrap.h"
-#include "frozen_modules/importlib._bootstrap_external.h"
-#include "frozen_modules/zipimport.h"
-#include "frozen_modules/abc.h"
-#include "frozen_modules/codecs.h"
-#include "frozen_modules/io.h"
-#include "frozen_modules/_collections_abc.h"
-#include "frozen_modules/_sitebuiltins.h"
-#include "frozen_modules/genericpath.h"
-#include "frozen_modules/ntpath.h"
-#include "frozen_modules/posixpath.h"
-#include "frozen_modules/os.h"
-#include "frozen_modules/site.h"
-#include "frozen_modules/stat.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"
-#include "frozen_modules/__phello__.ham.eggs.h"
-#include "frozen_modules/__phello__.spam.h"
-#include "frozen_modules/frozen_only.h"
-/* End includes */
-
-#define GET_CODE(name) _Py_get_##name##_toplevel
-
-/* Start extern declarations */
-extern PyObject *_Py_get_importlib__bootstrap_toplevel(void);
-extern PyObject *_Py_get_importlib__bootstrap_external_toplevel(void);
-extern PyObject *_Py_get_zipimport_toplevel(void);
-extern PyObject *_Py_get_abc_toplevel(void);
-extern PyObject *_Py_get_codecs_toplevel(void);
-extern PyObject *_Py_get_io_toplevel(void);
-extern PyObject *_Py_get__collections_abc_toplevel(void);
-extern PyObject *_Py_get__sitebuiltins_toplevel(void);
-extern PyObject *_Py_get_genericpath_toplevel(void);
-extern PyObject *_Py_get_ntpath_toplevel(void);
-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_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___phello___toplevel(void);
-extern PyObject *_Py_get___phello___ham_toplevel(void);
-extern PyObject *_Py_get___phello___ham_eggs_toplevel(void);
-extern PyObject *_Py_get___phello___spam_toplevel(void);
-extern PyObject *_Py_get_frozen_only_toplevel(void);
-/* End extern declarations */
-
-static const struct _frozen bootstrap_modules[] = {
- {"_frozen_importlib", _Py_M__importlib__bootstrap, (int)sizeof(_Py_M__importlib__bootstrap), false, GET_CODE(importlib__bootstrap)},
- {"_frozen_importlib_external", _Py_M__importlib__bootstrap_external, (int)sizeof(_Py_M__importlib__bootstrap_external), false, GET_CODE(importlib__bootstrap_external)},
- {"zipimport", _Py_M__zipimport, (int)sizeof(_Py_M__zipimport), false, GET_CODE(zipimport)},
- {0, 0, 0} /* bootstrap sentinel */
-};
-static const struct _frozen stdlib_modules[] = {
- /* stdlib - startup, without site (python -S) */
- {"abc", _Py_M__abc, (int)sizeof(_Py_M__abc), false, GET_CODE(abc)},
- {"codecs", _Py_M__codecs, (int)sizeof(_Py_M__codecs), false, GET_CODE(codecs)},
- {"io", _Py_M__io, (int)sizeof(_Py_M__io), false, GET_CODE(io)},
-
- /* stdlib - startup, with site */
- {"_collections_abc", _Py_M___collections_abc, (int)sizeof(_Py_M___collections_abc), false, GET_CODE(_collections_abc)},
- {"_sitebuiltins", _Py_M___sitebuiltins, (int)sizeof(_Py_M___sitebuiltins), false, GET_CODE(_sitebuiltins)},
- {"genericpath", _Py_M__genericpath, (int)sizeof(_Py_M__genericpath), false, GET_CODE(genericpath)},
- {"ntpath", _Py_M__ntpath, (int)sizeof(_Py_M__ntpath), false, GET_CODE(ntpath)},
- {"posixpath", _Py_M__posixpath, (int)sizeof(_Py_M__posixpath), false, GET_CODE(posixpath)},
- {"os.path", _Py_M__posixpath, (int)sizeof(_Py_M__posixpath), false, GET_CODE(posixpath)},
- {"os", _Py_M__os, (int)sizeof(_Py_M__os), false, GET_CODE(os)},
- {"site", _Py_M__site, (int)sizeof(_Py_M__site), false, GET_CODE(site)},
- {"stat", _Py_M__stat, (int)sizeof(_Py_M__stat), false, GET_CODE(stat)},
-
- /* runpy - run module with -m */
- {"importlib.util", _Py_M__importlib_util, (int)sizeof(_Py_M__importlib_util), false, GET_CODE(importlib_util)},
- {"importlib.machinery", _Py_M__importlib_machinery, (int)sizeof(_Py_M__importlib_machinery), false, GET_CODE(importlib_machinery)},
- {"runpy", _Py_M__runpy, (int)sizeof(_Py_M__runpy), false, GET_CODE(runpy)},
- {0, 0, 0} /* stdlib sentinel */
-};
-static const struct _frozen test_modules[] = {
- {"__hello__", _Py_M____hello__, (int)sizeof(_Py_M____hello__), false, GET_CODE(__hello__)},
- {"__hello_alias__", _Py_M____hello__, (int)sizeof(_Py_M____hello__), false, GET_CODE(__hello__)},
- {"__phello_alias__", _Py_M____hello__, (int)sizeof(_Py_M____hello__), true, GET_CODE(__hello__)},
- {"__phello_alias__.spam", _Py_M____hello__, (int)sizeof(_Py_M____hello__), false, GET_CODE(__hello__)},
- {"__phello__", _Py_M____phello__, (int)sizeof(_Py_M____phello__), true, GET_CODE(__phello__)},
- {"__phello__.__init__", _Py_M____phello__, (int)sizeof(_Py_M____phello__), false, GET_CODE(__phello__)},
- {"__phello__.ham", _Py_M____phello___ham, (int)sizeof(_Py_M____phello___ham), true, GET_CODE(__phello___ham)},
- {"__phello__.ham.__init__", _Py_M____phello___ham, (int)sizeof(_Py_M____phello___ham), false, GET_CODE(__phello___ham)},
- {"__phello__.ham.eggs", _Py_M____phello___ham_eggs, (int)sizeof(_Py_M____phello___ham_eggs), false, GET_CODE(__phello___ham_eggs)},
- {"__phello__.spam", _Py_M____phello___spam, (int)sizeof(_Py_M____phello___spam), false, GET_CODE(__phello___spam)},
- {"__hello_only__", _Py_M__frozen_only, (int)sizeof(_Py_M__frozen_only), false, GET_CODE(frozen_only)},
- {0, 0, 0} /* test sentinel */
-};
-const struct _frozen *_PyImport_FrozenBootstrap = bootstrap_modules;
-const struct _frozen *_PyImport_FrozenStdlib = stdlib_modules;
-const struct _frozen *_PyImport_FrozenTest = test_modules;
-
-static const struct _module_alias aliases[] = {
- {"_frozen_importlib", "importlib._bootstrap"},
- {"_frozen_importlib_external", "importlib._bootstrap_external"},
- {"os.path", "posixpath"},
- {"__hello_alias__", "__hello__"},
- {"__phello_alias__", "__hello__"},
- {"__phello_alias__.spam", "__hello__"},
- {"__phello__.__init__", "<__phello__"},
- {"__phello__.ham.__init__", "<__phello__.ham"},
- {"__hello_only__", NULL},
- {0, 0} /* aliases sentinel */
-};
-const struct _module_alias *_PyImport_FrozenAliases = aliases;
-
-
-/* Embedding apps may change this pointer to point to their favorite
- collection of frozen modules: */
-
-const struct _frozen *PyImport_FrozenModules = NULL;