[Distutils] Embedding python (and added goodies) in a fundamentally relocatable product distribution

Domen Kožar domen at dev.si
Thu May 28 14:02:20 CEST 2015


You could achieve that using Nix package manager[0] (I won't go into a long
story about Conda vs Nix).

Once you build python interpreter including all dependencies using
buildPythonPackage.buildEnv[1],
you'll get a closure (runtime dependency graph[2]) that can be copied to
any system with the same architecture that it was built on. The binary
doesn't require anything to be installed separately (even not Nix).

We have a number of Python packages[6], but there is an on-going effort
(lot's of work to be done) to package the whole PyPI (or at least have the
capability to do so) with system dependencies.

Currently a plain Python interpreter with all runtime dependencies is about
250MB, but this could be reduced down to 50MB using multiple outputs[3] -
meaning each package is split into /lib and everything else and only /lib
is used for runtime dependency graph. There is a Pull Request open[4] to
address the closure size, but it's not yet ready to be merged (I expect
that to happen in 2015).

If you have more questions, you're welcome to join nix-dev[5] mailing list
or come to #nixos channel on Freenode IRC network.

Domen


[0] http://nixos.org/nix
[1] http://nixos.org/nixpkgs/manual/#python-build-env
[2] http://static.domenkozar.com/slides/pycon-us-2015/#/5
[3] http://static.domenkozar.com/slides/pycon-us-2015/#/24
[4] https://github.com/NixOS/nixpkgs/pull/7701
[5] http://lists.science.uu.nl/mailman/listinfo/nix-dev
[6] http://nixos.org/nixos/packages.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150528/60e93458/attachment.html>


More information about the Distutils-SIG mailing list