10000 Freeze zipimport into _bootstrap_python · python/cpython@d2d0ba1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d2d0ba1

Browse files
committed
Freeze zipimport into _bootstrap_pythonWhen build python with other build systems, we may need _bootstrap_python to import modules from zipped stdlib.
1 parent 7bae15c commit d2d0ba1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Makefile.pre.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,8 @@ Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS)
976976

977977
BOOTSTRAP_HEADERS = \
978978
Python/frozen_modules/importlib._bootstrap.h \
979-
Python/frozen_modules/importlib._bootstrap_external.h
979+
Python/frozen_modules/importlib._bootstrap_external.h \
980+
Python/frozen_modules/zipimport.h
980981

981982
Programs/_bootstrap_python.o: Programs/_bootstrap_python.c $(BOOTSTRAP_HEADERS) $(PYTHON_HEADERS)
982983

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Freeze zipimport module into _bootstrap_python

Programs/_bootstrap_python.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/* Includes for frozen modules: */
1313
#include "Python/frozen_modules/importlib._bootstrap.h"
1414
#include "Python/frozen_modules/importlib._bootstrap_external.h"
15+
#include "Python/frozen_modules/zipimport.h"
1516
/* End includes */
1617

1718
/* Empty initializer for deepfrozen modules */
@@ -30,6 +31,7 @@ _Py_Deepfreeze_Fini(void)
3031
static const struct _frozen bootstrap_modules[] = {
3132
{"_frozen_importlib", _Py_M__importlib__bootstrap, (int)sizeof(_Py_M__importlib__bootstrap)},
3233
{"_frozen_importlib_external", _Py_M__importlib__bootstrap_external, (int)sizeof(_Py_M__importlib__bootstrap_external)},
34+
{"zipimport", _Py_M__zipimport, (int)sizeof(_Py_M__zipimport)},
3335
{0, 0, 0} /* bootstrap sentinel */
3436
};
3537
static const struct _frozen stdlib_modules[] = {

0 commit comments

Comments
 (0)
0