Developer documentation

Overview

tests

Github Actions

package

PyPI Package latest release PyPI Package monthly downloads PyPI Wheel Supported versions Supported implementations

Installation

Requirements

  • Python 3.9 or higher

  • Git

Stable version

pip install pytrip98gui

Latest unstable version, directly from GIT repository:

pip install git+https://github.com/pytrip/pytripgui.git

Development Installation (from source)

To work with the project locally, clone the repository and install in editable mode:

git clone https://github.com/pytrip/pytripgui.git
cd pytripgui
python -m venv venv

On Windows:

venv\Scripts\activate

On Linux/macOS:

source venv/bin/activate

Then install in editable mode with development dependencies:

pip install -e ".[dev]"

To uninstall, simply use:

pip uninstall pytrip98gui

Running pytripgui

To run stable version installed using pip manager, simply type:

pytripgui

To run unstable, development version of pytripgui (when working with source code), type:

python -m pytripgui.main

Building the Windows installer

To create the Windows installer locally, you need Python 3.14 on Windows, PyInstaller, and Inno Setup 6+. All commands below should be run from the repository root.

  1. Create/activate a virtual environment and install build tools:

    python -m venv .venv
    .venv\Scripts\activate
    python -m pip install --upgrade pip
    python -m pip install . pyinstaller
    
  2. Install Inno Setup (for example):

    choco install innosetup -y
    
  3. Build the frozen application:

    python -m PyInstaller main.spec
    

    The spec script modifies the matplotlib backend configuration, generates a VERSION file in build/ that is then bundled at the root of the frozen application, and updates win_innosetup.iss with the detected version and platform information.

  4. Build the installer executable:

    "C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe" win_innosetup.iss
    

The final installer lands in dist/installer/ (for example pytripgui_<version>_win_64bit_setup.exe), while the unpacked PyInstaller build lives in dist/pytripgui/.

History