-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the PyCompyle wiki! This is your central hub for all documentation, guides, examples, and advanced usage tips for PyCompyle, the Python packaging tool by MrBooks36.
PyCompyle allows you to package Python scripts into standalone executables (EXE) while keeping the project as close to its raw form as possible. Whether you’re creating small utilities or full applications, PyCompyle helps you manage dependencies, optimize builds, and deploy your Python projects efficiently.
PyCompyle is designed to simplify packaging Python scripts into EXE files. It provides fine-grained control over build options, supports adding missing dependencies, and allows you to customize the final executable with icons, UAC prompts, and more.
- Package Python scripts into standalone EXE files.
- Skip confirmation dialogs for faster builds.
- Specify a custom icon for your EXE.
- Include additional Python packages not automatically detected.
- Enable verbose output to see detailed build steps.
- Create windowed applications without a console.
- Retain build files for debugging or reuse.
- Use debugging tools for in-depth error tracking.
- Copy specific files or folders into the build directory.
- Force refresh essential files from GitHub.
- Add a UAC (User Account Control) prompt to the executable.
Requirements: Python 3.6 or higher.
To install PyCompyle:
- Visit the Releases page for the latest version.
- Download the
installer.pyscript. - Run the installer:
python installer.pyThis will install PyCompyle directly into your site-packages directory.
Basic command format:
python -m PyCompyle source_file.py-
-nc,--noconfirm: Skip confirmation dialogs. -
-f,--folder: Build to a folder instead of onefile EXE. -
-zip,--zip: Build a zip file version. -
-bat,--bat: Use a .bat file instead of an EXE (implies--folder). -
-i,--icon: Specify a custom icon. -
-p,--package: Add a package that might be missed automatically (repeatable). -
-v,--verbose: Enable verbose output. -
-w,--windowed: Build a windowed application. -
-k,--keepfiles: Keep the build files. -
-d,--debug: Enable all debugging tools (overrides some defaults). -
-c,--copy: Copy specific files or folders into the build directory (case-sensitive). -
-uac,--uac: Add a UAC prompt. -
--force-refresh: Remove cached files and reinstall components. -
--disable-compressing: Disable file compression. -
--disable-password: Disable password protection on onefile EXE.
This example packages my_script.py into an EXE with advanced options:
python -m PyCompyle --force-refresh --icon="myicon.ico" --verbose --windowed --package=numpy --package=ollama my_script.py-
Adding linked imports: If a dependency isn’t detected automatically, open an issue with the
linked imports enhancementlabel. -
Debugging builds: Use
--debugto retain build files, enable verbose output, and troubleshoot issues. -
Custom packaging: Combine
--folder,--zip, or--batoptions to control the format and startup method of your executable.
Contributions are welcome! You can:
- Submit issues for bugs or feature requests.
- Open a pull request to improve functionality.
- Report missing linked imports for better dependency handling.
This project is licensed under the terms specified in LICENSE.md.