Closed behrica closed 2 years ago
Sure, nothing is stopping someone from doing that :-).
I gave it a first shot. I am completely newby on python packages, but I manged to upload something on the test-pypy https://test.pypi.org/simple/
The following command works for me on an empty virtualenv and in an empty Docker after installing python3 and java and clojure.
The package declares a dependency to python-javabridge
export JAVA_HOME=.....
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cljbridge
This might install python-javabridge
which only works if JAVA_HOME is set.
inside python:
from clojurebridge import cljbridge
cljbridge.init_jvm(start_repl=True,port=12345,bind='0.0.0.0')
@cnuernber , maybe you could try it out ones. As I'm very new to python packages, I am not sure if I did a valid package. I looks like it, at least
Code of the package is here: https://github.com/behrica/clojurebridge It uses "current cljbridge.py" from here: https://github.com/clj-python/libpython-clj/blob/master/cljbridge.py
Once we have done this, we could go step further and make sure that the embedded repl started by python honors "deps.edn" and constructs the same classpath as a Clojure CLI would. The needed pieces for this are here: https://github.com/clojure/tools.deps.alpha
can be closed
Not having it as a proper python module, makes some integrations difficult