Skip to content

UIUCLibrary/speedwagon_scripts

Repository files navigation

speedwagon_scripts

scripts for working with speedwagon

Instructions

Prerequisite:

  • .whl file of project including the speedwagon plugins.
  • Version of Python installed that is compatible with Speedwagon

Windows only:

  • Wix Toolset installed (NOTE: only version 3 works. Version 4 or greater is not currently supported)

On Mac

./make_standalone.sh yourpackage.whl

On Windows

  make_standalone.bat yourpackage.whl

Additional Arguments

Using --base-python-path PATH before the .whl file in the command will allow other versions of python to be used other than the one first found on the path.

./make_standalone.sh --base-python-path /usr/bin/python3.11 yourpackage.whl

Using --venv-path PATH before the .whl file in the command will skip the creation of a python virtual environment and use and existing one instead.

./make_standalone.sh --venv-path ./exisiting_venv yourpackage.whl

All other arguments can be used after the .whl file

options:
  -h, --help            show this help message and exit
  --force-rebuild       force application environment to be rebuilt
  --build-path BUILD_PATH
                        path to build directory (default: build/packaging)
  --dist DIST           output path directory (default: dist)
  --installer-icon INSTALLER_ICON
                        icon used by installer (default: packaging/favicon.icns)
  --app-bootstrap-script APP_BOOTSTRAP_SCRIPT
                        Python script used to launch Speedwagon (default: packaging/speedwagon-bootstrap.py)
  --app-icon APP_ICON   Application icon (default: packaging/favicon.ico)
  --app-name APP_NAME   Name of application (default: Speedwagon)
  --app-executable-name APP_EXECUTABLE_NAME
                        Name of application executable file (default: speedwagon)
  -r REQUIREMENT, --requirement REQUIREMENT
                        -r --requirement <file> Install from the given requirements file. This option can be used multiple times.

Troubleshooting

Problem: Speedwagon closes as soon as it is opened.

Possible Reason: Speedwagon does not include the GUI framework by default & these files are missing from the package.

Possible Fixes:

  • Update the dependencies section of the pyproject.toml to include speedwagon[Qt] and regenerate the .whl file.

or

  • Create an additional requirements file with the line speedwagon[Qt] and pass the file to the --requirement argument.
./make_standalone.sh yourpackage.whl --requirement gui_requirements.txt

Set up development environment

  1. Create a Python virtual environment with the dev requirements

    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements-dev.txt
  2. Install pre-commit hooks (optional)

    pre-commit install