This repository was archived by the owner on Aug 5, 2021. It is now read-only.
Maven generates an auto installable jar with C libraries embedded.#78
Open
pabloa wants to merge 1 commit intobcdev:masterfrom
Open
Maven generates an auto installable jar with C libraries embedded.#78pabloa wants to merge 1 commit intobcdev:masterfrom
pabloa wants to merge 1 commit intobcdev:masterfrom
Conversation
Only tested on Linux. When jpy is invoked from the JVM, C libraries are extracted to the temporal directory and jpy library is initialized. Therefore there is not need to install JPY by compiling jpy sources. It is enough to use the generated jar file.
Member
|
@pabloa nice work! Could you meanwhile test on other platforms? (We urgently need Travis/AppVeyor support.) |
Author
|
Hello, Regarding to the jar generation with the compiled C modules embebbed, it should work in the 3 OS because maven is instructed to include .so and .dll files. But again, no windows box to test it. |
| OutputStream output = null; | ||
| byte[] buffer = new byte[8 * 1024]; | ||
| try { | ||
| filename = new File(System.getProperty("java.io.tmpdir"), "jpy-" + randomInt); |
Contributor
There was a problem hiding this comment.
There is still a risk that this line overwrites an existing file. A safer alternative would be to delete randomInt and use File.createTempFile("jpy-", ".so") (or ."dll") instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only tested on Linux.
When jpy is invoked from the JVM, C libraries are extracted to the
temporal directory and jpy library is initialized.
Therefore there is not need to install JPY by compiling jpy sources.
It is enough to use the generated jar file.