Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 56d4944

Browse files
authored
Merge pull request #12 from paulproteus/more-aggressively-remove-files-from-stdlib
More aggressively remove files from Python stdlib
2 parents e7a7e11 + bddb00b commit 56d4944

File tree

2 files changed

+45
-10
lines changed

2 files changed

+45
-10
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build
22
dist
33
.git
4-
.github
4+
.github
5+
tmp

3.7.pythonhome-excludes

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,51 @@
1-
# This file is used by `zip -i@this_file` in `Dockerfile` on
2-
# each architecture to filter the Python standard library we
3-
# distribute.
4-
lib/python*/config-*
1+
# This is a list of Python standard library path patterns
2+
# we exclude from the Python-Android-support ZIP file. It is
3+
# used by `zip -i@this_file` in `Dockerfile` to filter the pythonhome.zip
4+
# we generate for each Android ABI.
5+
#
6+
# Remove standard library test suites.
57
lib/python*/ctypes/test/*
6-
lib/python*/curses/*
78
lib/python*/distutils/tests/*
8-
lib/python*/ensurepip/*
9-
lib/python*/idlelib/*
109
lib/python*/lib2to3/tests/*
11-
lib/python*/site-packages/*
1210
lib/python*/sqlite3/test/*
1311
lib/python*/test/*
12+
# Remove compiled test and example modules.
13+
lib/python*/lib-dynload/_test*.so
14+
lib/python*/lib-dynload/_ctypes_test*.so
15+
lib/python*/lib-dynload/xxlimited*.so
16+
lib/python*/lib-dynload/_xxtestfuzz.so
17+
# Remove wsgiref web app module; it's unusual that mobile apps would
18+
# start a web app server with it.
19+
lib/python*/wsgiref/*
20+
# Remove command-line curses toolkit.
21+
lib/python*/curses/*
22+
# Remove config-* directory, which is used for compiling C extension modules.
23+
lib/python*/config-*
24+
# Remove ensurepip. If user code needs pip, it can add it to
25+
lib/python*/ensurepip/*
26+
# Remove Tcl/Tk GUI code. We don't build against Tcl/Tk at the moment, so this
27+
# will not work.
28+
lib/python*/idlelib/*
1429
lib/python*/tkinter/*
1530
lib/python*/turtle.py
1631
lib/python*/turtledemo/*
17-
lib/python*/wsgiref/*
32+
# Remove lib/pkgconfig files. These are used for compiling C extension modules.
33+
lib/pkgconfig/*
34+
# Remove site-packages directory. The Android template unpacks user code and
35+
# dependencies to a different path.
36+
lib/python*/site-packages/*
37+
# Remove include/ directory, only useful for compiling C extension modules.
38+
include/*
39+
# Remove bin/ directory, which contains executables like 2to3
40+
# (not useful in the app) and python3, which could possibly be useful,
41+
# except Python-Android-support doesn't support launching Python as a
42+
# subprocess very well at the moment.
43+
bin/*
44+
# Remove share/ directory, which contains user documentation (man pages).
45+
share/*
46+
# Remove libpython.so from the stdlib package. We rely on the libpython.so
47+
# in the JNI libs directory instead.
48+
lib/libpython3*.so
49+
# Remove pyc files. These take up space, but since most stdlib modules are
50+
# never imported by user code, they mostly have no value.
51+
*/*.pyc

0 commit comments

Comments
 (0)