spacr._starplast¶
Install and launch the separate Starplast desktop application.
Starplast uses PyQt6 and never imports into spaCR’s PySide6 process. Its
environment lives under ~/.spacr/apps (or SPACR_APPS_DIR). Installation
reuses the segmentation installers’ interpreter discovery, isolated command
environment and cancellable subprocess runner, without registering a detector.
Attributes¶
Install the latest compatible stable release from the official PyPI index. |
|
Optional explicit source for development installations. |
Functions¶
|
Return the external-application folder without creating it. |
|
Compare the actual isolated installation with compatible stable PyPI releases. |
|
Use PyPI unless a developer explicitly overrides the installation source. |
|
Build an isolated environment, install Starplast and check its bundled data. |
|
Whether an owned environment has passed the import and bundled-data checks. |
|
Start Starplast as a separate process, logging output beside its environment. |
|
Isolate Python, pip and Qt plugin lookup from the running spaCR process. |
|
Upgrade the owned environment using pip and PyPI, then verify its data. |
Module Contents¶
- spacr._starplast.apps_root(root=None) pathlib.Path[source]¶
Return the external-application folder without creating it.
- Parameters:
root – explicit folder, otherwise
SPACR_APPS_DIRor~/.spacr/apps.- Returns:
absolute application root.
- spacr._starplast.check_starplast_update(*, root=None, cancel=None, runner=None) dict[source]¶
Compare the actual isolated installation with compatible stable PyPI releases.
- Parameters:
root – external-application folder.
cancel – optional cancellation event for subprocesses.
runner – optional cancellable command runner for tests.
- Returns:
installed/latest version strings and an
availableboolean.- Raises:
RuntimeError – the installation or package index cannot be checked.
- spacr._starplast.default_source() str[source]¶
Use PyPI unless a developer explicitly overrides the installation source.
- Returns:
SPACR_STARPLAST_SOURCEor the unpinned PyPI package name.
- spacr._starplast.install_starplast(source=None, *, root=None, progress=None, cancel=None, runner=None, preflight=None) pathlib.Path[source]¶
Build an isolated environment, install Starplast and check its bundled data.
Local Git sources are archived from committed HEAD into temporary storage; pip never writes build files into the original checkout. A failed install removes only the environment created here, and retains
starplast-install.log.- Parameters:
source – starplast on PyPI, or an explicit local Git checkout or repository URL; default_source otherwise. PyPI resolves the latest compatible stable release at installation time, without a version pin.
root – external-application folder.
progress – callback
(step, steps, text); called off the GUI thread.cancel – threading.Event; cancels commands and their descendants.
runner – optional subprocess-runner substitute for focused tests.
preflight – optional interpreter-preflight substitute for focused tests.
- Returns:
completed environment path.
- Raises:
RuntimeError – installation failed, was cancelled, or folder is unowned.
ValueError – the selected source is neither a suitable local Git checkout, the PyPI package, nor an allowed official repository URL.
- spacr._starplast.is_installed(root=None) bool[source]¶
Whether an owned environment has passed the import and bundled-data checks.
- Parameters:
root – external-application folder.
- Returns:
true only with a completed record and environment interpreter.
- spacr._starplast.launch_starplast(*, root=None, popen=None)[source]¶
Start Starplast as a separate process, logging output beside its environment.
- Parameters:
root – external-application folder.
popen – optional subprocess.Popen substitute for focused tests.
- Returns:
child process, which the UI monitors for launch errors.
- Raises:
RuntimeError – no completed environment exists.
- spacr._starplast.process_environment(env: pathlib.Path) dict[source]¶
Isolate Python, pip and Qt plugin lookup from the running spaCR process.
- Parameters:
env – Starplast’s virtual environment.
- Returns:
subprocess variables retaining desktop display and user settings.
- spacr._starplast.upgrade_starplast(source=None, *, root=None, progress=None, cancel=None, runner=None) pathlib.Path[source]¶
Upgrade the owned environment using pip and PyPI, then verify its data.
- Parameters:
source – ignored; upgrades always use the PyPI Starplast package.
root – external-application folder.
progress – optional
(step, total, text)callback.cancel – optional subprocess cancellation event.
runner – optional command runner for tests.
- Returns:
verified environment path.
- Raises:
RuntimeError – upgrade failed or was cancelled. Files and logs remain for diagnosis; an interrupted environment must be repaired before launch.
Nested helpers¶
- install_starplast.line(text, number=number, label=label)¶
Persist all subprocess output and send the latest line to Qt.
spacr/_starplast.py:192
- upgrade_starplast.line(text, number=number, label=label)¶
Persist pip diagnostics and update the progress display.
spacr/_starplast.py:296