Closed dcramer closed 9 years ago
Another idea thats very specific to this, and less so to platter would be to have a way to build a lazy bundle. This would create something similar to the above, but upon execution it would be responsible for installing dependencies/etc.
This actually already exist: https://pex.readthedocs.org/
Unfortunately I ran into some issues with that and I did not figure out how to fix them. However I have already thought about talking to the guy who maintains that about solving my particular problems.
If only pex didn't require this arbitrary format. Ideally what would happen is it could create a wrapper around the package. Giving you some kind of environment that is just a virtualenv of sorts, builds the main.py file for you, installs all of the dependencies, and then tarballs it. Asking someone to install pex to run a program is just as easy as asking them to install pip/requirements.
pex doesn't require you to install pex to run the zip files it creates. The zip files are executable on their own, assuming a python interpreter exists in your environment.
@bkad turns out I was confused when reading the docs
I've wanted this for ages, and platter seems to be in the position where it could either offer it as a feature, or it could simply be an underlying tool utilized in solving it.
Someone said this jokingly the other day, but for now I'm going to call it a big wheel, but really it's just a zip file with
__main__
defined.To illustrate this concept better, let me use Sentry using the hypothetical API:
I think it's pretty clear cut how this could happen, the primary thing being platter assisting with generation of the
__main__
file and promoting this as a concept.