Closed theotherp closed 6 years ago
Don't use Python for a wrapper
The Python wrapper has the advantage of running on both Linux and macOS. The Linux version would work on both if you hadn't compiled the wrapper.
Obviously, you'd have to bundle PyYAML, too.
I expected most people to be able to run the binaries. As a python and Java developer I underestimated how many people would have problems with the binaries. I'll put the wrapper python script with removed PyYAML dependencies into a "OS-agnostic" package soon.
As far as binaries (and UNIX-like OSes) go, I don't think there's a meaningful difference between the compiled wrapper and a plain old Python script (with a python2
shebang and the executable bit set).
The PyYAML dependency apart (which is trivially bundled), the non-compiled script has the advantage of running with any Python 2 on any architecture or platform. I don't have a clue about how architecturally-independent JAR files are, but that script also runs on a RaspberryPi or other ARM machine.
macOS and most Linux distros have Python by default (though only Python 3 is installed by default on some).
The tricky bit, imo, is installing Java. It's a total pain on macOS because you have to install it manually from Oracle's awful website, and as long as Java is a requirement, Linux folks can just as easily run apt-get install java python2
as they can apt-get install java
.
We'll see. For now there are ways for most people to get it working one way or the other, that's a good start.
Indeed.
On the Pi at least the oracle JDK in the Repo is horribly outdated, I think it is installing Java8u65. So not suitable for Hydra.
Oracle's 32bit ARM hard float package is working for hydra on the pi for me: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I was able to use the wrapper to get hydra running on my Pi2 & Pi3 with systemd and the python wrapper. I simply changed the "exec" line from /your/path/here/nzbhydra2 --nobrowser
to /your/path/here/nzbhydra2wrapper.py
To be realistic, won't do that in quite some time. Or ever.
Don't use Python for a wrapper, write a native wrapper using C++ or similar.