【发布时间】:2017-02-14 13:38:23
【问题描述】:
我们制作 ARM 9 嵌入式系统、Linux 等。最近有客户要求我们为他们预装 Python 3。我们进行了交叉编译(QEMU 真的很神奇),但生成的构建是 177Mb,所以这是不行的。这里最好的计划是什么——我们可以离开 Doc 目录,也许还有“build”目录?我看到 Lib 目录是 54Mb - 这是选择客户需要什么库的情况吗?我们对 Python 知之甚少。需要明确的是,我看到很多关于打包 Python 应用程序的建议——这不是我们正在做的事情——我们正在打包 Python 运行时。谢谢! (目录大小汇总如下)
1.6M ./Python-3.6.0/Mac 760K ./Python-3.6.0/Include 17M ./Python-3.6.0/build 5.4M ./Python-3.6.0/Python 8.0K ./Python-3.6.0/.github 54M ./Python-3.6.0/Lib 2.7M ./Python-3.6.0/PC 2.7M ./Python-3.6.0/Tools 6.9M ./Python-3.6.0/Objects 11M ./Python-3.6.0/Doc 824K ./Python-3.6.0/Parser 20M ./Python-3.6.0/Modules 15M ./Python-3.6.0/Programs 620K ./Python-3.6.0/PCbuild 12K ./Python-3.6.0/Grammar 5.8M ./Python-3.6.0/Misc 161M ./Python-3.6.0 177M .
【问题讨论】:
-
查看 Alex Martelli 对此问题的回答:stackoverflow.com/questions/2344712/…
-
谢谢 - 我见过这样的答案 - 但是使运行时特定于特定的 python 应用程序,对吗?这不是我想要的 - 我想知道一般分发 Python 的最“常见”方式,而不是针对某个特定应用程序。
标签: linux python-3.x embedded runtime