Permalink
Browse files

Notes on trying to delete certain modules.

Also save a useful function

I don't think there's any more low hanging fruit.  _sre.c and
unicodeobject.c were a bunch of work.  bytearrayobject.c was easy but it
broke OHeap.
  • Loading branch information...
Andy Chu
Andy Chu committed Aug 19, 2018
1 parent 4c95c89 commit 9ca3d7f3239174841a9fa85722c57f2bdd6080d6
Showing with 22 additions and 0 deletions.
  1. +11 −0 build/compile.sh
  2. +11 −0 scripts/ovm.sh
View
@@ -9,6 +9,17 @@ set -o errexit
source build/common.sh
# NOTES on trying to delete certain modules:
#
# _warnings.c: There weren't that many; it probably could be deleted.
# bufferobject.c: the types.py module uses it.
# Python-ast.h: pythonrun.c uses it in several places (mod_ty), and a lot of
# stuff uses pythonrun.c.
# pythonrun.c: lots interpreter flags and interpreter initialization caused
# link errors.
# dtoa.c: not tried, but I assume that %.3f for 'time' uses it.
readonly OVM_PYTHON_OBJS='
Python/_warnings.c
Python/bltinmodule.c
View
@@ -22,4 +22,15 @@ pp-vars() {
gcc -E -dM - < $PY27/pyconfig.h
}
# Modify this function to trace imports. It helped with 're'.
# Where do codecs.c and codecs.py get imported?
# codecs.py is from encodings, but I don't nkow where that gets imported.
#
# I think runpy use encodings.
blame-import() {
PYTHONVERBOSE=9 \
_OVM_RESOURCE_ROOT=. PYTHONPATH=. \
python -S -c 'from bin import oil; import sys; print sys.modules["codecs"]'
}
"$@"

0 comments on commit 9ca3d7f

Please sign in to comment.