This document describes how to build cross-platform executables for the SUSE Observability Integrations Finder.
The project uses PyInstaller to create standalone executables for multiple platforms and architectures:
- Linux: x86_64, aarch64
- macOS: x86_64, aarch64 (Apple Silicon)
- Windows: x86_64
- Python 3.8 or higher
- pip (Python package installer)
- Git
- Standard build tools (gcc, g++, make)
- tar, gzip for packaging
- Xcode Command Line Tools
- tar, gzip for packaging
- Visual Studio Build Tools (for native builds)
- zip for packaging
# Install Python dependencies
pip install -r build_requirements.txt
# Or use the Makefile
make install-deps# Using Python script
python build.py all
# Using Makefile
make build-all# Linux x86_64
python build.py linux-x86_64
make build-linux-x86_64
# macOS aarch64
python build.py macos-aarch64
make build-macos-aarch64
# Windows x86_64
python build.py win-x86_64
make build-win-x86_64Use this method when building on the target platform or when you have cross-compilation tools available.
# Install dependencies
pip install -r build_requirements.txt
# Build for specific target
python build.py <platform>-<arch>
# Examples:
python build.py linux-x86_64
python build.py macos-aarch64
python build.py win-x86_64Use this method for cross-platform builds without requiring native toolchains.
# Make script executable
chmod +x build-docker.sh
# Build for all platforms
./build-docker.sh all
# Build for specific platform
./build-docker.sh linux-x86_64
./build-docker.sh macos-aarch64
./build-docker.sh win-x86_64Use the provided Makefile for convenient build targets.
# Show available targets
make help
# Build all platforms
make build-all
# Build specific platform
make build-linux-x86_64
make build-macos-aarch64
make build-win-x86_64
# Clean build artifacts
make cleanAfter a successful build, you'll find:
- Executables: In
dist/suse-observability-integrations-finder/ - Packages: In
packages/directory - Build artifacts: In
build/directory
- Linux:
.tar.gzarchives - macOS:
.tar.gzarchives (with optional.appbundles) - Windows:
.ziparchives
packages/
├── suse-observability-integrations-finder-linux-x86_64.tar.gz
├── suse-observability-integrations-finder-linux-aarch64.tar.gz
├── suse-observability-integrations-finder-macos-x86_64.tar.gz
├── suse-observability-integrations-finder-macos-aarch64.tar.gz
└── suse-observability-integrations-finder-win-x86_64.zip
The build script automatically generates a PyInstaller spec file with:
- Icon: Uses
assets/images/logo.pngas application icon - Data files: Includes logo and other assets
- Hidden imports: All required PyQt6 and other dependencies
- Platform-specific settings: Optimized for each target
You can modify the build configuration by editing:
build.py: Main build scriptbuild_requirements.txt: Build dependenciesMakefile: Build targets and commands
The project includes two GitHub Actions workflows:
- Triggers: Every push and pull request
- Purpose: Ensures code quality and functionality
- Actions:
- Runs unit tests and integration tests
- Verifies CLI and GUI functionality
- Checks code formatting and linting
- Validates imports and dependencies
- Triggers: Every push, PR, and git tag
- Builds: Always builds executables for all platforms
- Publishes: Only publishes releases for git tags
- Platforms: Linux (x86_64, aarch64), macOS (x86_64, aarch64), Windows (x86_64)
- Create a tag:
git tag v1.0.0 && git push origin v1.0.0 - Automatic build: GitHub Actions builds all platform executables
- Automatic release: Creates GitHub release with downloadable packages using GitHub CLI
- Release notes: Automatically generated from commits using GitHub API
# Create a new release
./release.sh v1.0.0
# The script will:
# - Validate version format
# - Check working directory is clean
# - Create and push git tag
# - Trigger GitHub Actions releaseTo run the full build locally:
# Clean previous builds
make clean
# Build all platforms
make build-all
# Check results
ls -la packages/- Build artifacts: Available for 30 days on all builds
- Build logs: Available for 7 days for debugging
- Release packages: Permanently available in GitHub releases
Problem: Missing hidden imports
Solution: Add missing modules to the hiddenimports list in build.py
Problem: Icon file not found or invalid format
Solution: Ensure assets/images/logo.png exists and is a valid PNG file
Problem: Architecture-specific build errors Solution: Use Docker build method for cross-platform compilation
Problem: Executable includes unnecessary dependencies
Solution: Review and optimize the excludes list in the spec file
- Ensure you have the required build tools:
sudo apt-get install build-essential - For aarch64 builds, ensure you have ARM64 toolchain
- Install Xcode Command Line Tools:
xcode-select --install - For Apple Silicon builds, ensure you're using the correct Python version
- Install Visual Studio Build Tools
- Ensure you have the Windows SDK installed
To create debug builds with more verbose output:
# Add debug flags to PyInstaller
python build.py --debug linux-x86_64-
Tag a release:
git tag v1.0.0 git push origin v1.0.0
-
GitHub Actions will automatically:
- Build all platforms
- Create a GitHub release
- Upload all artifacts
For manual distribution:
# Build all platforms
make build-all
# Create distribution package
tar -czf suse-observability-integrations-finder-v1.0.0.tar.gz packages/- Executables are not signed by default
- Consider code signing for production releases
- Verify checksums of distributed packages
- Use HTTPS for downloads
- Use UPX compression (enabled by default)
- Exclude unnecessary modules
- Optimize data file inclusion
- Use parallel builds where possible
- Cache build dependencies
- Use incremental builds for development
For build-related issues:
- Check the troubleshooting section above
- Review PyInstaller documentation
- Check GitHub Actions logs for CI/CD issues
- Create an issue in the project repository