Building From Source - edgeof8/tIRC GitHub Wiki
This page details the steps to build tIRC from its source code. This is useful if you want to create distributable packages or test specific build configurations.
Prerequisites
Ensure you have completed the Development Setup, which includes:
- Python 3.8+
- Git
- An activated virtual environment with project dependencies installed (
requirements.txt
).
Additionally, for building packages and executables, the README.md
mentions:
build
(Python package): Install withpip install build
PyInstaller
: Install withpip install pyinstaller
These should ideally be installed within your project's virtual environment.
Build Process
The README.md
indicates a build.py
script is used for the build process.
-
Ensure Development Dependencies are Installed: If there's a
requirements-dev.txt
or similar for build tools, ensure it's installed:pip install -r requirements-dev.txt # or install build and PyInstaller manually if not in requirements pip install build pyinstaller
-
Run the Build Script: From the root directory of the tIRC project, execute the build script:
python build.py
This script typically handles:
- Building the Python package (wheel and source distribution).
- Creating standalone executables for your current platform using PyInstaller.
Build Output
According to the README.md
, the build process will output artifacts to the dist/
directory. These include:
-
Python Package:
tirc-X.Y.Z.tar.gz
(source distribution)tirc-X.Y.Z-py3-none-any.whl
(wheel) (Replace X.Y.Z with the actual version number)
-
Standalone Executable (for the platform the build was run on):
- Windows:
tirc-X.Y.Z-win64.exe
- Linux:
tirc-X.Y.Z-linux
- macOS:
tirc-X.Y.Z-macos
- Windows:
Testing the Build
The README.md
mentions a test_build.py
script. After a successful build, you can run this to validate the created package and executable:
python test_build.py
This test script is expected to verify:
- Package installation.
- Executable functionality.
- Headless mode operation.
- Configuration file handling.
Troubleshooting Common Build Issues
- Missing Dependencies: Ensure all packages listed in
requirements.txt
and any build-specific tools (likebuild
,PyInstaller
,wheel
) are installed in your virtual environment. - Platform-Specific Issues: Building executables can sometimes have platform-specific challenges. Consult PyInstaller documentation or project-specific notes if you encounter errors.
- Python Version: Verify you are using a compatible Python version (3.8+ as per
README.md
). - Path Issues: Ensure the build script is run from the project's root directory.
For more detailed build instructions or troubleshooting, refer to any specific notes in the build.py
script itself or other developer documentation within the project.