You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ This changelog summarizes major changes between GraalVM versions of the Python
4
4
language runtime. The main focus is on user-observable behavior of the engine.
5
5
6
6
## Version 23.1.0
7
-
* Oracle GraalPy distributions (also known as GraalPy Enterprise) are now available under the [GFTC license](https://www.oracle.com/downloads/licenses/graal-free-license.html). The community builds published on Github have been renamed to `graalpy-community-<version>-<os>-<arch>.tar.gz`.
7
+
* Oracle GraalPy distributions (previously known as GraalPy Enterprise) are now available under the [GFTC license](https://www.oracle.com/downloads/licenses/graal-free-license.html). The community builds published on Github have been renamed to `graalpy-community-<version>-<os>-<arch>.tar.gz`.
8
8
* Add support for the sqlite3 module. This allows many packages like `coverage` or `Flask-SQLAlchemy` to work on top of this embedded database.
9
-
* Provide Windows distributions of GraalPy. This is the first preview of Windows support for this feature, and there are limitations, but pure Python packages like Pygal can be installed with `python -m pip --no-cache install pygal`.
9
+
* Provide Windows distributions of GraalPy. This is the first preview of Windows support for GraalPy, and there are limitations, but pure Python packages like Pygal can be installed with `python -m pip --no-cache install pygal`.
10
10
* The GraalPy standalone tool was updated. You can now build single-file executable Python binaries for Linux, Windows, and macOS. The tool can also generate a skeleton Maven project that sets up a polyglot embedding of Python packages into Java.
With GraalPy, you can distribute Python applications or libraries as standalone binaries or JAR files without any external dependencies.
10
10
The [Truffle framework](https://github.com/oracle/graal/tree/master/truffle) on which GraalPy is built, and the [Sulong LLVM runtime](https://github.com/oracle/graal/tree/master/sulong) that GraalPy leverages for managed execution of Python's native extensions enables users to completely virtualize all filesystem accesses of Python programs, including those to the standard library and installed packages.
11
11
12
-
GraalPy comes with a module that can create standalone binaries or Java project skeletons.
12
+
GraalPy comes with a module that can create standalone binaries or Java-Python polyglot project skeletons.
13
13
The binaries bundle everything into one native executable.
14
-
The Java skeletons are set up with Maven to build and run self-contained JAR files.
15
-
They can also be used to generate a standalone binary from those JAR files later, so Java skeletons offer more flexibility and control over the steps.
14
+
The polyglot skeletons are set up with Maven to to generate a standalone binary for a simple java - python hello world example and can be used as a starting point or inspiration for further java-python polyglot development.
16
15
17
16
### Prerequisite
18
17
19
-
Set `JAVA_HOME` to use a GraalVM distribution.
18
+
A GraalPy distribution.
19
+
TODO - add link
20
20
21
-
## Creating GraalPy Binaries
21
+
## Creating GraalPy Native Binaries
22
22
23
23
Suppose there is a simple Python script, _my_script.py_, that does some useful work when run directly.
24
24
To distribute it as a standalone native binary, run the following command:
25
25
26
26
```bash
27
-
graalpy -m standalone binary \
27
+
graalpy -m standalone native \
28
28
--module my_script.py \
29
29
--output my_binary
30
30
```
31
31
32
32
It generates a standalone _my_binary_ file which includes the Python code, the GraalPy runtime, and the Python standard library in a single, self-contained executable.
33
-
Use `graalpy -m standalone binary --help` for further options.
34
-
33
+
Use `graalpy -m standalone native --help` for further options.
34
+
35
35
## Embedding GraalPy in a Java Application
36
36
37
-
You can distribute the Python script as a JAR file that runs on GraalVM and includes GraalPy.
38
-
To achieve this, run the `java` subcommand of GraalPy's `standalone` module:
37
+
You can also generate a Java-Python polyglot project skeleton.
38
+
To achieve this, run the `polyglot_app` subcommand of GraalPy's `standalone` module:
It creates a Java project _MyJavaApplication_. It includes a _pom.xml_ file that makes it easy to generate a JAR file or a GraalVM native executable with Maven.
44
+
It creates a Java project _MyJavaApplication_. It includes a _pom.xml_ file that makes it easy to generate a GraalVM native executable with Maven.
47
45
You can open this Maven project with any Java IDE and edit the main class that was created to modify the Python embedding.
48
-
To build the application, either use `mvn -Pjar package` to create a JAR file, or `mvn -Pnative package` to create a GraalVM native executable.
46
+
To build the application, either use `mvn -Pnative package` to create a GraalVM native executable.
49
47
50
48
Take a look at the generated _pom.xml_ file.
51
49
There are some options to tweak the performance and footprint trade-off.
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/AssignmentTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/AtomsTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,7 +38,7 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/AwaitAndAsyncTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/BasicTests.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,10 +38,11 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/BenchmarkTest.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/ClassDefTests.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/DefaultStringFactoryImpl.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,7 +38,9 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/DictAndSetTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/ErrorTests.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,10 +38,12 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/FuncDefTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/GeneratorAndCompForTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,7 +38,7 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/ImportTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/LambdaInFunctionTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/ListAndSlicingTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/NamedExprTest.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,7 +38,7 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.pegparser.test/src/com/oracle/graal/python/pegparser/test/NumberTests.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2
+
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -38,7 +38,7 @@
38
38
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0 commit comments