Hacker News new | past | comments | ask | show | jobs | submit login
Exxo – build portable Python binaries (github.com/mbachry)
74 points by whalesalad on Jan 9, 2016 | hide | past | favorite | 11 comments



> Although exxo binary itself is statically linked, included C extensions (if any) are not. All required shared libraries must be installed on the target machine. For example, if you use lxml, you must install libxml2.

This is a major shortcoming. It means, e.g. that an app with a PyQt or Wx GUI requires those to be installed on the target system, at the expected level. PyInstaller, cxfreeze, etc. bundle all dependencies into the frozen app making it really independent of the receiving environment. Identifying all those dependencies at build time is _highly_ nontrivial, and packaging them so that the Python import statements work at run-time is even less so.


I love that this comes with an apt-get line telling you exactly what you need to install to get running. Every project should do this.


Great, but it's not clear how this is different from several other Python packagers like Pyinstaller. Any clues?


Seems comparable to Twitter's PEX: a relocatable venv with custom entry points to act as a binary. PEX also takes the zip approach but allows for not zip safe libraries by unpacking to a directory before running.


I like the approach taken here - pants/PEX is a bit of a monster (no offense intended - it's a very smart monster, but a monster nonetheless).

I'm glad to see projects taking a simpler approach to zip apps - pants makes sense if you're trying to package legacy apps with huge sets of dependencies, but it's overkill for smaller apps.

However, the author needs to add some test coverage before I'd feel comfortable contributing or using it.


> "Because your application is run as zipapp, it must be zip safe. ... The main violation against zip safety is using filesystem API..."

I like everything about this, except for the possibility that zipapp constraints could haunt me.


In what sense is it meant that this is 'portable' it says they only support Linux on x64.


The word portable isn't limited to architecture. If you've ever tried to build software with Python and distribute it in a simple way (a-la go, or a Java .jar) it's not easy. This (and others mentioned below, like PEX) aim to make shipping Python app "binaries" around simple, regardless of OS or system Python presence


It IS easy. You can just tell people to `pip install --user your_app` and use it (might need $PATH correction). All Linux distros ship with Python, and if pip is not available, it can be installed easily.

Or you can build and ship .rpm/.deb packages if you feel like it.


Things like py2exe have been around for ages. I was more wondering if this was better or same thing for Linux.


I was thinking the same but I'm assuming that it's designed to be portable but not yet implemented on other platforms.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: