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

Kevin Ollivier kevin-lists at theolliviers.com
Thu Jul 28 14:27:55 EDT 2016


On 7/28/16, 9:30 AM, "Python-ideas on behalf of Xavier de Gaye" <python-ideas-bounces+kevin-lists=theolliviers.com at python.org on behalf of xdegaye at gmail.com> wrote:

>Issue 26852 [1] proposes an enhancement to reduce the size of the Python
>installation by using a sourceless distribution. It seems that
>discussion on this problem (the size of the Python installation on
>mobile devices) should be moved here.

Is the reason you're doing this as a configure flag rather than some tool that can run on a full Python distro because this is a cross-compile target?

I ask because as Victor points out, this concern is really not unique to Android or mobile development. There are numerous use cases for wanting a sourceless distribution on just about any mobile, desktop or server platform. The abundance of tools out there that try to solve this problem is a testament to how common the need is.

If Python could spit out a sourceless version of itself, complete with site-packages, that alone would go a long way towards consolidating the packaging logic into one place, and would likely solve the mobile and embedded problem as well.

>IMHO there is no need to debate on the fact that a full install of
>Python on a mobile device today is a problem.
>
>As a reference, here is a raw estimation of the sizes of the different
>installs:
>
>     full install: 111M
>     without the test suite: 53M
>     without the test suite and as a sourceless distribution: 23M
>     same as above but also without ensurepip: 14M
>
>It would be useful to find the references to the previous discussions
>related to sourceless distributions, especially the reasons why their
>use is discouraged.

I suspect the concerns against it are the complexity of implementation, but after having done this for many years, I rather want something that is less 'smart' than the existing packaging tools I've used try to be. What I'd love personally is the ability to simply take a full Python install - system distro, venv or cross-compile target - and just package the whole thing up minus sources. I can be careful to make sure I have only what I need in it before building the release. At most I'd like to be able to specify a whitelist / blacklist file to include / exclude specific things.

Thanks,

Kevin


>Xavier
>
>[1] http://bugs.python.org/issue26852
>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>https://mail.python.org/mailman/listinfo/python-ideas
>Code of Conduct: http://python.org/psf/codeofconduct/



More information about the Python-ideas mailing list