Skip to content
Snippets Groups Projects
Commit d80bbf09 authored by Amandine  TOURNAY's avatar Amandine TOURNAY
Browse files

Fixed POM

parent 415e6ff9
No related branches found
No related tags found
1 merge request!2Merge main branck into carlos-edits to integrate Amandine and Stephane's and and Carlos' codes
......@@ -6,10 +6,10 @@
<!-- Inherited Icy Parent POM -->
<parent>
<artifactId>pom-icy</artifactId>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>parent-pom-plugin</artifactId>
<version>1.0.5</version>
</parent>
<version>2.0.0</version>
</parent>
<!-- Project Information -->
<artifactId>icy-jep</artifactId>
......@@ -19,7 +19,7 @@
<name>JEP - Java Embedded Python fot Icy</name>
<description>Jep embeds CPython in Java through JNI. Fork to include the library in Icy.</description>
<url></url>
<url>https://icy.bioimageanalysis.org/plugin/jep-java-embedded-python/</url>
<inceptionYear>2022</inceptionYear>
<organization>
......@@ -74,35 +74,21 @@
</properties>
<!-- Project build configuration -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>${project.artifactId}-fetch</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>autocomplete</includeArtifactIds>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<stripVersion>true</stripVersion>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>icy-plugin-extract-library</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<!-- List of project's dependencies -->
<dependencies>
<dependency>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>icy-kernel</artifactId>
<version>${icy-kernel.version}</version>
</dependency>
<dependency>
......
package plugins.atournay.jep;
import com.drew.lang.annotations.NotNull;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginLibrary;
......@@ -25,7 +24,7 @@ public class JepPlugin extends Plugin implements PluginLibrary {
* @param path The path to test
* @return The result if the String is really a path (compatible Windows, MacOS &amp; Linux)
*/
public boolean isPath(@NotNull String path) {
public boolean isPath(String path) {
if (Pattern.compile("([A-Za-z]:|[/\\\\])+.(\\w)+.*").matcher(path).find()) {
return true;
}
......
package plugins.atournay.jep;
import com.drew.lang.annotations.NotNull;
import jep.*;
import java.io.File;
......@@ -30,7 +29,7 @@ public class JepUtils {
* @param sitePackagesPath Path to the site-packages directory
* @return Path to JEP
*/
public String findJepLib(@NotNull String sitePackagesPath) {
public String findJepLib(String sitePackagesPath) {
String jetPath = "";
File jepDir = new File(sitePackagesPath, "jep");
......@@ -58,7 +57,7 @@ public class JepUtils {
* @param jepPath Path the JEP execution file (libjep.(so|jnilib|ddl))
* @param pythonRoot Path to the Python root directory
*/
public void setJepPath(@NotNull String jepPath, @NotNull String pythonRoot) throws JepException {
public void setJepPath(String jepPath, String pythonRoot) throws JepException {
setJepConfig(new JepConfig());
getJepConfig().setClassEnquirer(new CustomClassEnquirer());
......@@ -106,7 +105,7 @@ public class JepUtils {
* @param jepConfig JEP configurations {@link jep.JepConfig} and example at {@link plugins.atournay.jep.CustomClassEnquirer}
* @return Python interpreter to execute some Python commands, retrieve values, etc...
*/
public SubInterpreter openSubPython(@NotNull JepConfig jepConfig) {
public SubInterpreter openSubPython(JepConfig jepConfig) {
return new SubInterpreter(jepConfig);
}
......@@ -125,7 +124,7 @@ public class JepUtils {
return jepConfig;
}
private void setJepConfig(@NotNull JepConfig newJepConfig) {
private void setJepConfig(JepConfig newJepConfig) {
this.jepConfig = newJepConfig;
}
......@@ -133,7 +132,7 @@ public class JepUtils {
return jepInterpreter;
}
private void setJepInterpreter(@NotNull Interpreter jepInterpreter) {
private void setJepInterpreter(Interpreter jepInterpreter) {
this.jepInterpreter = jepInterpreter;
}
}
package plugins.atournay.jep;
import com.drew.lang.annotations.NotNull;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
......@@ -76,7 +74,7 @@ public class PythonUtils {
* @param isDirectory Set if the path is ending by a directory (true) or a file (false)
* @return The full path of the Python execution file
*/
public String findPythonExecutable(@NotNull String path, @NotNull boolean isDirectory) {
public String findPythonExecutable(String path, boolean isDirectory) {
if (isDirectory) {
File[] pythonFiles = new File(path).listFiles((file, name) -> name.equals("bin") && file.isDirectory());
......@@ -106,7 +104,7 @@ public class PythonUtils {
* @param pythonExecutionPath Path to the Python home directory
* @return The path to the site-packages directory
*/
public String setSitePackagesDirectory(@NotNull String pythonExecutionPath) {
public String setSitePackagesDirectory(String pythonExecutionPath) {
String terminalLine;
String[] command = new String[]{pythonExecutionPath, "-c", "import sys; print([p for p in sys.path if p.endswith(\"site-packages\")])"};
String sitePackagesPath = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment