-
Notifications
You must be signed in to change notification settings - Fork 24
Distributing applications
Self-contained bundles are distributed for the bumps
and refl1d
webview servers.
- These are built for Windows, MacOS and Linux using a single script: build_conda_packed.sh in the "extra" folder.
- This script is run by the build-webview.yml Github Action, which is currently manually run on-demand.
- Output files from this script are attached to the "unstable" release
The distributed bundles are based on a self-contained Python environment, which has been created with conda-pack
While this is not an advertised feature of conda-pack
, it is very good for creating standalone, folder-based Python environments (similar to the "embeddable package" for Windows that is distributed by Python.org, but working on all platforms)
An empty folder-based environment (including python executable and pip executable) is extracted from a conda-packed environment, and then in that folder we use pip
to install bumps@webview and refl1d@webview branches. The resulting folder is then compressed to a single archive, with a few platform-dependent post-processing steps:
- for Windows, it is transformed into a self-extracting executable
- for MacOS, it is made into a Mac
.pkg
file for direct install intoApplications
Additionally, some shortcuts for starting the server with a double-click are added to the root application folder for Windows and MacOS.
These basically run python -m refl1d.webview.server
using the python from the environment folder.
After extracting the archive, a fully functioning Python virtual environment is available to the users, independent of any Python installed on their system (or even if they have none). They can run pip install ...
in the environment to add more packages that work with refl1d
, like molgroups