[Python-ideas] size of the installation of Python on mobile devices

Xavier de Gaye xdegaye at gmail.com
Sat Jul 30 08:18:56 EDT 2016


On 07/30/2016 09:25 AM, Stephen J. Turnbull wrote:
 > For example, as Terry mentioned not all applications need the
 > unicodedata module, and it's *big*, but many applications I can
 > imagine doing myself (spam-checking and other validation of textual
 > data) would include it.

How *big* exactly ?
The size of the unicodedata shared library is 843K on archlinux when a
sourceless distribution saves many tens of Mega bytes and a
distribution without the test suite saves about 60M.

IMHO only three options should be implemented, if the Python community
really thinks seriously about porting Python to mobile devices:
     * --enable-sourceless-distribution
     * --disable-test-suite
     * --disable-distutils-builds
The last option is to get rid of the config (LIBPL) directory that is
used to build extension modules, as one cannot expect most mobile
devices to have a proper build environment anyway.

The result would be a distribution in the 10M order of magnitude, ten
times smaller than the current size. Then we can look into
compression, the impacts of compression on the size of the memory used
by the python process and the impacts of compression on performance in
mobile devices.

The remaining savings (unicodedata, turtledemo, tkinter, unittest,
...) should be left to packagers.



More information about the Python-ideas mailing list