Supporting Python Dependencies in Java Project using Jython

Answered

I am using Jython libraries within my Java project to call some Python functions from a Python file. However, that Python file has dependencies that I need to capture using Ivy (dependency resolution) with Ant build tools. I am already using Ant and Ivy in the project, and am able to retrieve the .whl Python library files I need from the repository, but whenever I add them to the classpath (Project Structure -> SDKs -> Classpath), they stay for one execution and then get removed from the classpath the next time I build the project. I assume this is because the Java project is looking for .jar dependencies and does not think the .whl files need to be on the classpath. But how do I permanently keep the the .whl files on the classpath for use by the Python classes (and the Jython libraries from within Java)?

0
5 comments
Avatar
Permanently deleted user

Additional background info: I am using IntelliJ IDEA 14.1.5

0

Does it happen in the current version available at http://www.jetbrains.com/idea/download/index.html?

Is your project Maven based?

0
Avatar
Permanently deleted user

Unfortunately I can't test it with the current version, as I am using IntelliJ on a private network. And the project is not really Maven-based, but I am just resolving some dependency needs with Ivy / Ant.

0

IDE should not silently remove the dependencies, check the file types:

0
Avatar
Permanently deleted user

Excellent, that helped. Thank you very much. I'm not sure why .whl files were missing from that list initially in my environment.

0

Please sign in to leave a comment.