Skip to content

Commit ce1d381

Browse files
ban-miolyagpl
authored andcommitted
[GR-71397] Splitting out the different graalpy approaches
PullRequest: graalpython/4257
2 parents 33f5e2a + b6e3964 commit ce1d381

30 files changed

Lines changed: 2358 additions & 1302 deletions

README.md

Lines changed: 12 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ GraalPy is ready for production running pure Python code and has experimental su
1616
**Low-overhead integration with Java and other languages**
1717

1818
* Use [Python in Java](docs/user/Interoperability.md) applications on GraalVM JDK, Oracle JDK, or OpenJDK
19-
* Use JVM tools like [Maven](docs/user/README.md), JFR, or [GraalVM Native Image](docs/user/Native-Images-with-Python.md)
19+
* Use JVM tools like [Maven](docs/user/Embedding-Build-Tools.md), JFR, or [GraalVM Native Image](docs/user/Native-Images-with-Python.md)
2020
* Manage Python libraries' system access thanks to GraalPy's [Java-based emulation of Python OS APIs](docs/user/Embedding-Permissions.md)
2121

2222
**Compatible with the Python ecosystem**
@@ -84,65 +84,13 @@ This means that build tools have to be available and installation will take long
8484
We provide [Github actions](scripts/wheelbuilder) to help you build binary packages with the correct dependencies.
8585
Thanks to our integration with GraalVM Native Image, we can deploy Python applications as [standalone binary](docs/user/Python-Standalone-Applications.md), all dependencies included.
8686

87-
* Linux
87+
**Quick Installation:**
8888

89-
The easiest way to install GraalPy on Linux is to use [Pyenv](https://github.com/pyenv/pyenv) (the Python version manager).
90-
To install version 25.0.2 using Pyenv, run the following commands:
91-
```bash
92-
pyenv install graalpy-25.0.2
93-
```
94-
```bash
95-
pyenv shell graalpy-25.0.2
96-
```
97-
> NOTE: There will be a delay between GraalPy release and its availability on Pyenv. Make sure to update Pyenv.
98-
99-
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
100-
101-
1. Find the download that matches the pattern _graalpy-XX.Y.Z-linux-amd64.tar.gz_ or _graalpy-XX.Y.Z-linux-aarch64.tar.gz_ (depending on your platform) and download.
102-
2. Uncompress the file and update your `PATH` environment variable to include the _graalpy-XX.Y.Z-linux-amd64/bin_ (or _graalpy-XX.Y.Z-linux-aarch64/bin_) directory.
103-
104-
* macOS
105-
106-
The easiest way to install GraalPy on macOS is to use [Pyenv](https://github.com/pyenv/pyenv) (the Python version manager).
107-
To install version 25.0.2 using Pyenv, run the following commands:
108-
```bash
109-
pyenv install graalpy-25.0.2
110-
```
111-
```bash
112-
pyenv shell graalpy-25.0.2
113-
```
114-
> NOTE: There will be a delay between GraalPy release and its availability on Pyenv. Make sure to update Pyenv.
115-
116-
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
117-
118-
1. Find the download that matches the pattern _graalpy-XX.Y.Z-macos-aarch64.tar.gz_ and download.
119-
2. Remove the quarantine attribute.
120-
```bash
121-
sudo xattr -r -d com.apple.quarantine /path/to/graalpy
122-
```
123-
For example:
124-
```bash
125-
sudo xattr -r -d com.apple.quarantine ~/.pyenv/versions/graalpy-25.0.2
126-
```
127-
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-aarch64/bin_ directory.
128-
129-
* Windows
130-
131-
The Windows support of GraalPy is still experimental, so not all features and packages may be available.
132-
The easiest way to install GraalPy on Windows is to use [Pyenv-win](https://pyenv-win.github.io/pyenv-win/) (the Python version manager for Windows).
133-
To install version 25.0.2 using Pyenv-win, run the following commands:
134-
```cmd
135-
pyenv install graalpy-25.0.2-windows-amd64
136-
```
137-
```cmd
138-
pyenv shell graalpy-25.0.2-windows-amd64
139-
```
140-
> NOTE: There will be a delay between GraalPy release and its availability on Pyenv. Make sure to update Pyenv.
141-
142-
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
89+
- **Linux/macOS**: `pyenv install graalpy-25.0.2 && pyenv shell graalpy-25.0.2`
90+
- **Windows**: `pyenv install graalpy-25.0.2-windows-amd64`
91+
- **Manual**: Download from [GitHub releases](https://github.com/oracle/graalpython/releases)
14392

144-
1. Find the download that matches the pattern _graalpy-XX.Y.Z-windows-amd64.tar.gz_ and download.
145-
2. Uncompress the file and update your `PATH` variable to include to the _graalpy-XX.Y.Z-windows-amd64/bin_ directory.
93+
**See the [complete installation guide](docs/user/Standalone-Getting-Started.md) for detailed instructions.**
14694

14795
</details>
14896
<details>
@@ -161,36 +109,17 @@ The _setup-python_ action supports GraalPy:
161109
<details>
162110
<summary><strong><a name="start-migrating-jython-scripts-to-graalpy"></a>Migrating Jython Scripts to GraalPy</strong></summary>
163111
164-
Most existing Jython code that uses Java integration will be based on a stable Jython release&mdash;however, these are only available in Python 2.x versions.
112+
Most existing Jython code that uses Java integration will be based on a stable Jython releasehowever, these are only available in Python 2.x versions.
165113
To migrate your code from Python 2 to Python 3, follow [the official guide from the Python community](https://docs.python.org/3/howto/pyporting.html).
166114
GraalPy provides a [special mode](docs/user/Python-on-JVM.md) to facilitate migration.
167-
To run Jython scripts, you need to use a GraalPy distribution running on the JVM so you can access Java classes from Python scripts.
168-
169-
* Linux
170-
171-
1. Find and download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases) that matches the pattern _graalpy-jvm-XX.Y.Z-linux-amd64.tar.gz_ or _graalpy-jvm-XX.Y.Z-linux-aarch64.tar.gz_ (depending on your platform) and download.
172-
2. Uncompress the file and update your `PATH` environment variable to include the _graalpy-jvm-XX.Y.Z-linux-amd64/bin_ (or _graalpy-jvm-XX.Y.Z-linux-aarch64/bin_) directory.
173-
3. Run your scripts with `graalpy --python.EmulateJython`.
174-
175-
* macOS
176115
177-
1. Find and download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases) that matches the pattern _graalpy-jvm-XX.Y.Z-macos-aarch64.tar.gz_ and download.
178-
2. Remove the quarantine attribute.
179-
```bash
180-
sudo xattr -r -d com.apple.quarantine /path/to/graalpy
181-
```
182-
For example:
183-
```bash
184-
sudo xattr -r -d com.apple.quarantine ~/.pyenv/versions/graalpy-25.0.2
185-
```
186-
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-jvm-XX.Y.Z-macos-aarch64/bin_ directory.
187-
4. Run your scripts with `graalpy --python.EmulateJython`.
116+
**Quick Setup:**
188117
189-
* Windows
118+
1. Download a GraalPy JVM distribution: `graalpy-jvm-XX.Y.Z-<platform>.tar.gz`
119+
2. Extract and add to PATH
120+
3. Run with: `graalpy --python.EmulateJython`
190121

191-
1. Find and download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases) that matches the pattern _graalpy-jvm-XX.Y.Z-windows-amd64.tar.gz_.
192-
2. Uncompress the file and update your `PATH` variable to include to the _graalpy-jvm-XX.Y.Z-windows-amd64/bin_ directory.
193-
3. Run your scripts with `graalpy --python.EmulateJython`.
122+
**See the [complete migration guide](docs/user/Python-on-JVM.md) for detailed instructions.**
194123

195124
</details>
196125

0 commit comments

Comments
 (0)