Skip to main content

Python package for compiling projects with Nuitka and creating Windows installers with Wix Toolset

Project description

Installer Creator

Python package for compiling projects with Nuitka and creating Windows installers with Wix Toolset.

Installation

pip install installer-creator

Prerequisites

  1. Wix Toolset (required for installer creation):

    dotnet tool install --global wix
    

    The package will automatically install the Wix UI extension if missing

  2. Nuitka (will be installed automatically)

Configuration

Create a build_config.yaml file:

# Nuitka build configuration
project:
  name: "MyApp"  # Application name
  version: "1.0.0"
  description: "My Application Description"
  company: ""
  icon: "app_icon.ico"  # Optional icon file
  main_file: "main.py"  # Entry point file

build:
  output:
    directory: "dist"
    filename: "my_app.exe"  # Output executable name
  options:
    standalone: true
    onefile: true
    splash_screen: ""
    remove_output: true
  include:
    packages:
      - ""
    plugins:
      - ""
    data_dirs:
      - source: "resources"
        target: "resources"
    external_data:
      - "*.dll"
    files:
      - "requirements.txt"
      - "readme.md"
      - "*.json"  # Example wildcard pattern
  copy_beside:
    - "resources"

installer:
  enabled: true
  output:
    directory: "dist"
    filename: "my_app_installer.msi"
  metadata:
    manufacturer: "Your Company"
    product_name: "My Application"
    upgrade_code: ""  # Generate with installer-creator generate-uuid
  ui:
    banner_image: "banner.bmp"
    dialog_image: "dialog.bmp"
  license_file: "license.rtf"
  shortcuts:
    desktop: true
    start_menu: true

debug:
  enabled: false
  console:
    mode: "disabled"
    stdout: null
    stderr: null

exclude:
  - "__pycache__"
  - "*.pyc"
  - "*.pyo"
  - "*.pyd"
  - "build"
  - "dist"

Resource Paths

The installer supports flexible resource locations:

  • UI images (banner/dialog) can be anywhere
  • License file can be anywhere
  • Paths can be absolute or relative to config file

Usage

# Generate UUID for upgrade code
installer-creator generate-uuid -s "MyAppName"

# Build executable
installer-creator build-exe -c build_config.yaml

# Create installer
installer-creator build-installer -c build_config.yaml

Testing

The project includes a comprehensive test suite to ensure functionality works as expected. The tests cover:

  • Building executables with Nuitka
  • Creating Windows installers with WiX Toolset
  • Handling special characters in manufacturer and product names
  • Configuration validation and loading

To run the tests:

# Install test dependencies
pip install pytest

# Run all tests
python tests/run_tests.py

# Or run specific tests
pytest tests/test_build_exe.py
pytest tests/test_build_installer.py

The test suite uses mocking to simulate the build environment, so you don't need to have WiX Toolset installed to run the tests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

installer_creator-0.1.7.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

installer_creator-0.1.7-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file installer_creator-0.1.7.tar.gz.

File metadata

  • Download URL: installer_creator-0.1.7.tar.gz
  • Upload date:
  • Size: 42.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for installer_creator-0.1.7.tar.gz
Algorithm Hash digest
SHA256 14b2f35603e5ecc91c9da6d9d03f451f9ff14e51779b9051117e2d4e129e86cc
MD5 2f409b044295d50b2c78e556cfd1dd35
BLAKE2b-256 f5e921cce9daee6a862ac79b593b8fb034ce22a42cf9afcf6e6e1a383b87f5b4

See more details on using hashes here.

File details

Details for the file installer_creator-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for installer_creator-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 87d0444a57ca5c73518232021ce94cc680c2142889a96cd2f0acc33bf1f5c245
MD5 e8849478ee9fef989c7465b2ceb1fa5a
BLAKE2b-256 7dc4fb029d8888d1d38b7d3c51ae6ec692b469e94b953e65b8161fcb007ca1a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page