Skip to content

Commit c4be570

Browse files
committed
Drop docstrings in .pyo
1 parent ce20881 commit c4be570

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎2.7.10/python.sh‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Compile minimal Python for Emscripten and native local testing
44

5-
# Copyright (C) 2018 Sylvain Beucler
5+
# Copyright (C) 2018, 2019 Sylvain Beucler
66

77
# Copying and distribution of this file, with or without modification,
88
# are permitted in any medium without royalty provided the copyright
@@ -87,8 +87,10 @@ emscripten () {
8787
emmake make -j$(nproc)
8888
# setup.py install_lib doesn't respect DESTDIR
8989
echo -e 'sharedinstall:\n\ttrue' >> Makefile
90+
# decrease .pyo size by dropping docstrings
91+
sed -i -e '/compileall.py/ s/ -O / -OO /' Makefile
9092
emmake make install DESTDIR=$DESTDIR
91-
93+
9294
# Basic trimming
9395
# Disabled for now, better cherry-pick the files we need
9496
#emmake make install DESTDIR=$(pwd)/destdir

0 commit comments

Comments
 (0)