On 10/13/2012 06:06 PM, Roman Shaposhnik wrote:
On Sat, Oct 13, 2012 at 5:19 PM, Bruno Mahé <[email protected]> wrote:
* Duplication. Doing a fat jar is nothing special to java. static linking
can be done for natives as well.
Can it be done for Python? How? This is an totally honest question -- I'm
really curious.
I believe we worked on some relocatable virtual env for hue.
Note that the virtualenv on my fedora also has a --relocatable option. I
don't think it would be there on a CentOS 5 though.
But usually (ie. in most cases) the python installation already fulfill
most needs. So unless you need something out of the ordinary (which
should not be the case for the use case described in this discussion),
there is not much need for a fat jar equivalent. Provided the script
targets a more common version of python.
Note also that unlike java, python is more packaging friendly. So most
uncommon dependencies are already packaged or easy to package.
But in any case, you shouldn't even need a fat jar-like for scripts.
Note that, I am also going the fat jar for some of my applications and find
this appropriate. But the fat jar approach would not fly for a system.
Indeed -- but this very thread is not about writing system software,
but rather finding an appropriate way of replacing the "shell hell"
with something more manageable...
The discussion has still diverged quite a bit from its original intent :)
But for a shell script replacement, you shouldn't even need a fat jar.
If you start to need so many uncommon dependencies, there is something
wrong with your approach.
Java would work, although it may end up quite verbose comparing to some
other languages (but soem other jvm based languages could fit better
such as scala and co).
Agreed. Scripts don't have to be in bash/python/perl.
Note also that if you need an IDE, maven (or other tool of your choice),
it's not a script anymore.
...and it seems we all agree on that note ;-)
Thanks,
Roman.