Skip to content

Commit

Permalink
Simplify GraalPy starter
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Oct 9, 2024
1 parent 5550bed commit 8894efb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
1 change: 0 additions & 1 deletion graalpy/graalpy-starter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ repositories {
dependencies {
implementation("org.graalvm.polyglot:polyglot:24.1.0")
implementation("org.graalvm.polyglot:python:24.1.0")
implementation("org.graalvm.python:python-embedding:24.1.0")

// Use JUnit Jupiter for testing.
testImplementation("org.junit.jupiter:junit-jupiter:5.11.0")
Expand Down
26 changes: 0 additions & 26 deletions graalpy/graalpy-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
<version>${graalpy.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.graalvm.python</groupId>
<artifactId>python-embedding</artifactId>
<version>${graalpy.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -61,27 +56,6 @@
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.graalvm.python</groupId>
<artifactId>graalpy-maven-plugin</artifactId>
<version>24.1.0</version>
<executions>
<execution>
<configuration>
<packages>
<!-- Select Python packages to install via pip. -->
<package>pyfiglet==1.0.2</package>
</packages>
</configuration>
<goals>
<goal>process-graalpy-resources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
Expand Down
3 changes: 1 addition & 2 deletions graalpy/graalpy-starter/src/main/java/com/example/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
package com.example;

import org.graalvm.polyglot.Context;
import org.graalvm.python.embedding.utils.GraalPyResources;

public class App {

public static void main(String[] args) {
try (Context context = GraalPyResources.createContext()) {
try (Context context = Context.create("python")) {
context.eval("python", "print('Hello from GraalPy!')");
}
}
Expand Down

0 comments on commit 8894efb

Please sign in to comment.