add hook for pyinstaller packaging
Similar to what is proposed in Petrush/orekit_jpype!6 , this proposal adds a hook which tells pyinstaller which data files to package when building a Python executable from Python scripts depending on the data in this repository. Heavily inspired from a similar hook for jpype
in https://github.com/jpype-project/jpype/pull/877
This use case is only for users who use the "stock" orekit data from this repository and don't need to update it too often are therefore are okay with packaging it in their executable. For users who manage their own orekit data folder, this case is also documented in README.md of Petrush/orekit_jpype!6
A test case is available (which builds the executable and runs a minimal test) and can be run with python -m PyInstaller.utils.run_tests --include_only orekitdata._pyinstaller -v
.
Of course I can understand if the repo maintainers don't want to have too much Python code in this data repository. Without hooks in this repo, it is also okay, users only need an additional argument to tell pyinstaller
to collect data from this Python library: --collect-data orekitdata
.