Skip to content

Commit e9443f2

Browse files
committed
[GR-48446] [GR-48602] [GR-48747] [GR-48732] [GR-48685] [GR-46479] Backport: tests, fix of Sulong managed deployment, fix for platform tags on Darwin.
PullRequest: graalpython/2987
2 parents 69b7b7a + b3b65e0 commit e9443f2

File tree

91 files changed

+2176
-1069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2176
-1069
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ graalpython.tests.src.zip.files/
8484
graalpython.src.zip.files/
8585
graalpython/com.oracle.graal.python.test/src/tests/patched_package/build/
8686
graalpython/com.oracle.graal.python.test/src/tests/patched_package/src/patched_package.egg-info
87+
graalpython/com.oracle.graal.python.test.integration/target

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ We welcome issue reports of all kinds and are working hard to close our compatib
1212

1313
The easiest option to try GraalPy is [pyenv](https://github.com/pyenv/pyenv/), the Python version manager.
1414
It allows you to easily install different GraalPy releases.
15-
To install version 22.3.0, for example, just run `pyenv install graalpy-22.3.0`.
15+
To install version 23.1.0, for example, just run `pyenv install graalpy-community-23.1.0`.
1616

1717
Another option is to use [Conda-Forge](https://conda-forge.org/).
1818
To get an environment with the latest version of GraalPy, use the following command:

ci.jsonnet

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "61d2e798a75f4b48457dda2d3b1d3f2ec83dace7" }
1+
{ "overlay": "4fe59ff78899a09c836fbb7920c8558d5ed786e7" }

docs/user/README.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ To distinguish between them, GraalPy Community has the suffix `-community` in th
2727

2828
```bash
2929
# Oracle GraalPy
30-
graalpy-VERSION-PLATFORM.tar.gz
30+
graalpy-<version>-<os>-<arch>.tar.gz
3131
# GraalPy Community
32-
graalpy-community-VERSION-PLATFORM.tar.gz
32+
graalpy-community-<version>-<os>-<arch>.tar.gz
3333
```
3434

3535
Two language runtime options are available for both Oracle and Community GraalPy: Native and JVM.
3636
In the Native configuration, GraalPy is ahead-of-time compiled to a standalone native executable.
3737
This means that you do not need a JVM installed on your system to use it and it is size-compact.
3838
In the JVM configuration, you can use Java interoperability easily, and peak performance may be higher than the native configuration.
39-
A JVM standalone that comes with a JVM has the `-jvm` suffix in a name: `graalpy-jvm-<version>-<os>-<arch>.tar.gz`.
39+
A JVM standalone that comes with a JVM has the `-jvm` suffix in the name: `graalpy-jvm-<version>-<os>-<arch>.tar.gz`.
4040

4141
| Configuration: | Native (default) | JVM |
4242
| ------------------ | ---------------: | ------------: |
@@ -47,7 +47,7 @@ A JVM standalone that comes with a JVM has the `-jvm` suffix in a name: `graalpy
4747

4848
## Installing GraalPy
4949

50-
You can install GraalPy either using a Python manager or downloading a compressed GraalPy tarball appropriate for your platform.
50+
You can install GraalPy by downloading a compressed GraalPy tarball appropriate for your platform. For GraalPy Community, you can also use `pyenv` or `conda`.
5151

5252
### Downloading
5353

@@ -58,6 +58,7 @@ You can install GraalPy either using a Python manager or downloading a compresse
5858
```shell
5959
sudo xattr -r -d com.apple.quarantine <archive>.tar.gz
6060
```
61+
6162
Now extract:
6263
```shell
6364
tar -xzf <archive>.tar.gz
@@ -68,19 +69,17 @@ You can install GraalPy either using a Python manager or downloading a compresse
6869
./path/to/bin/graalpy --version
6970
```
7071

71-
### Using `pyenv`
72+
### Using `pyenv` (GraalPy Community only)
7273
#### Linux and macOS
7374

74-
The other way to install GraalPy on Linux and macOS platforms is to use [pyenv](https://github.com/pyenv/pyenv/), the Python version manager.
75-
For example, to install version 23.1.1, run the following command:
75+
The other way to install GraalPy Community on Linux and macOS platforms is to use [pyenv](https://github.com/pyenv/pyenv/), the Python version manager.
76+
For example, to install version 23.1.0, run the following command:
7677

7778
```bash
78-
# To install Oracle GraalPy
79-
pyenv install graalpy-23.1.1
80-
# To install GraalPy Community
81-
pyenv install graalpy-community-23.1.1
79+
pyenv install graalpy-community-23.1.0
8280
```
8381

82+
### Using Conda Forge (GraalPy Community only)
8483
Another option is to use [Conda-Forge](https://conda-forge.org/).
8584
To get an environment with the latest version of GraalPy, use the following command:
8685

@@ -201,4 +200,4 @@ Learn more in a dedicated [GraalPy Interoperability guide](Interoperability.md).
201200

202201
## Related Documentation
203202

204-
* [Installing Supported Packages](Packages.md)
203+
* [Installing Supported Packages](Packages.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved.
4+
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5+
6+
The Universal Permissive License (UPL), Version 1.0
7+
8+
Subject to the condition set forth below, permission is hereby granted to any
9+
person obtaining a copy of this software, associated documentation and/or
10+
data (collectively the "Software"), free of charge and under any and all
11+
copyright rights in the Software, and any and all patent rights owned or
12+
freely licensable by each licensor hereunder covering either (i) the
13+
unmodified Software as contributed to or provided by such licensor, or (ii)
14+
the Larger Works (as defined below), to deal in both
15+
16+
(a) the Software, and
17+
18+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
19+
one is included with the Software each a "Larger Work" to which the Software
20+
is contributed by such licensors),
21+
22+
without restriction, including without limitation the rights to copy, create
23+
derivative works of, display, perform, and distribute the Software and make,
24+
use, sell, offer for sale, import, export, have made, and have sold the
25+
Software and the Larger Work(s), and to sublicense the foregoing rights on
26+
either these or other terms.
27+
28+
This license is subject to the following condition:
29+
30+
The above copyright notice and either this complete permission notice or at a
31+
minimum a reference to the UPL must be included in all copies or substantial
32+
portions of the Software.
33+
34+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40+
SOFTWARE.
41+
-->
42+
<!--
43+
This Maven project can compile and run the integration unit tests independently of
44+
the rest of the GraalPy sources on top of any supported JDK, e.g., OpenJDK, GraalVM JDK, etc.
45+
46+
When testing with custom Maven repository, i.e., locally built, one can pass -Dpolyglot_repo
47+
pointing to the Maven repository, for example:
48+
49+
mvn test -Dpolyglot_repo=file:///some/path/to/repo
50+
51+
Additionally, one can change the polyglot artifacts version with
52+
-Dpolyglot.version=24.0-SNAPSHOT, for example.
53+
-->
54+
<project xmlns="http://maven.apache.org/POM/4.0.0"
55+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
56+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
57+
<modelVersion>4.0.0</modelVersion>
58+
59+
<groupId>com.oracle.graal.python.test</groupId>
60+
<artifactId>integration</artifactId>
61+
<version>1.0-SNAPSHOT</version>
62+
63+
<properties>
64+
<maven.compiler.source>17</maven.compiler.source>
65+
<maven.compiler.target>17</maven.compiler.target>
66+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
67+
<polyglot.version>23.1.1-dev</polyglot.version>
68+
</properties>
69+
70+
<build>
71+
<sourceDirectory>src</sourceDirectory>
72+
<resources>
73+
<resource>
74+
<directory>src</directory>
75+
</resource>
76+
</resources>
77+
<plugins>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-surefire-plugin</artifactId>
81+
<version>2.22.2</version>
82+
<dependencies>
83+
<dependency>
84+
<groupId>org.apache.maven.surefire</groupId>
85+
<artifactId>surefire-junit4</artifactId>
86+
<version>2.22.0</version>
87+
</dependency>
88+
</dependencies>
89+
<configuration>
90+
<testSourceDirectory>src</testSourceDirectory>
91+
<testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
92+
<includes>
93+
<include>**/*.java</include>
94+
</includes>
95+
</configuration>
96+
</plugin>
97+
</plugins>
98+
</build>
99+
100+
<profiles>
101+
<profile>
102+
<id>Custom central repo</id>
103+
<activation>
104+
<property>
105+
<name>central_repo</name>
106+
</property>
107+
</activation>
108+
<repositories>
109+
<repository>
110+
<id>release</id>
111+
<url>${central_repo}</url>
112+
<releases>
113+
<enabled>true</enabled>
114+
</releases>
115+
<snapshots>
116+
<enabled>true</enabled>
117+
</snapshots>
118+
</repository>
119+
</repositories>
120+
</profile>
121+
<profile>
122+
<id>Custom polyglot repo</id>
123+
<activation>
124+
<property>
125+
<name>polyglot_repo</name>
126+
</property>
127+
</activation>
128+
<repositories>
129+
<repository>
130+
<id>release</id>
131+
<url>${polyglot_repo}</url>
132+
<releases>
133+
<enabled>true</enabled>
134+
</releases>
135+
<snapshots>
136+
<enabled>true</enabled>
137+
</snapshots>
138+
</repository>
139+
</repositories>
140+
</profile>
141+
</profiles>
142+
143+
<dependencies>
144+
<dependency>
145+
<groupId>org.graalvm.polyglot</groupId>
146+
<artifactId>polyglot</artifactId>
147+
<version>${polyglot.version}</version>
148+
</dependency>
149+
<dependency>
150+
<groupId>org.graalvm.polyglot</groupId>
151+
<artifactId>python-community</artifactId>
152+
<version>${polyglot.version}</version>
153+
<scope>runtime</scope>
154+
<type>pom</type>
155+
</dependency>
156+
<dependency>
157+
<!-- See MultiContextTest#testSharingWithStruct -->
158+
<groupId>org.graalvm.polyglot</groupId>
159+
<artifactId>llvm-community</artifactId>
160+
<version>${polyglot.version}</version>
161+
<scope>runtime</scope>
162+
<type>pom</type>
163+
</dependency>
164+
<dependency>
165+
<groupId>junit</groupId>
166+
<artifactId>junit</artifactId>
167+
<version>4.12</version>
168+
</dependency>
169+
</dependencies>
170+
</project>

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/CleanupRule.java renamed to graalpython/com.oracle.graal.python.test.integration/src/com/oracle/graal/python/test/integration/CleanupRule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3939
* SOFTWARE.
4040
*/
41-
package com.oracle.graal.python.test;
41+
package com.oracle.graal.python.test.integration;
4242

4343
import java.util.ArrayList;
4444

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/EngineOptionsTests.java renamed to graalpython/com.oracle.graal.python.test.integration/src/com/oracle/graal/python/test/integration/EngineOptionsTests.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@
3838
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3939
* SOFTWARE.
4040
*/
41-
package com.oracle.graal.python.test;
41+
package com.oracle.graal.python.test.integration;
4242

43+
import static com.oracle.graal.python.test.integration.Utils.IS_WINDOWS;
4344
import static org.junit.Assert.assertEquals;
45+
import static org.junit.Assume.assumeFalse;
4446

4547
import org.graalvm.polyglot.Context;
4648
import org.graalvm.polyglot.Engine;
@@ -50,6 +52,7 @@ public class EngineOptionsTests {
5052

5153
@Test
5254
public void engineOptions() {
55+
assumeFalse(IS_WINDOWS);
5356
Engine engine = Engine.newBuilder().build();
5457

5558
assertEquals("java", doit(engine, null));

0 commit comments

Comments
 (0)