See the example notebooks and the package test folder for examples.
See the example notebooks and the package test folder for examples.
...
@@ -95,3 +95,46 @@ In the JCC version, the interfaces are implemented as special classes named Pyth
...
@@ -95,3 +95,46 @@ In the JCC version, the interfaces are implemented as special classes named Pyth
### Subclassing of Orekit abstract classes
### Subclassing of Orekit abstract classes
In the JCC version of Orekit it is possible to subclass classes from the set of PythonClassName classes. This is not possible in the Jpype version of Orekit, which is limited to implementation of interfaces only.
In the JCC version of Orekit it is possible to subclass classes from the set of PythonClassName classes. This is not possible in the Jpype version of Orekit, which is limited to implementation of interfaces only.
# Packaging a project with `pyinstaller`
This repository contains hooks for `pyinstaller` so that your project relying on Orekit can be packaged into an executable. No additional arguments are needed to `pyinstaller` thanks to the hooks, as long as `orekit_jpype` is installed in your Python packages.
## Packaging the orekit data folder or library
### Using the orekitdata Python library
If you are using the [orekit data repository as a Python library](https://gitlab.orekit.org/orekit/orekit-data#notes-for-orekit-python-users), as the Orekit data files are not Python files, you have to specify the following option to `pyinstaller` to collect them into your executable:
```bash
pyinstaller --collect-data orekitdata <your main Python script>
```
This will create a folder `dist/` containing your executable.
### Locally managed orekit data folder
If the `orekit-data` folder is located in the same folder as your main Python script, you can for instance use the following syntax to load the orekit data in your Python code:
This will package a minimal executable containing orekit_jpype, orekitdata and run the test case `test/OrekitDataLoadOnlyLibTest.py` to test that everything works as expected.
TODO: include this test procedure in a CI pipeline.