Skip to main content

A simple packager for creating distributable python applications

Project description

DiamondPack

A simple packager for creating distributable Python applications


Used to create distributable applications in the simplest way possible. Enables Python applications to easily run on systems that don't have Python installed, and without the need for users to know what Python even is.

Features:

  • Build Windows and Linux applications
  • Minimal configuration needed
  • Fast execution, no waiting for libraries to unzip

Install:

Default install: pip install diamondpack

If you don't already have a version of CMake installed, in order to use the "app" mode, install the optional cmake package
pip install diamondpack[app] or pip install cmake

Usage:

1. Configure DiamondPack via your pyproject.toml

[project.scripts]
# Each script named here will generate a new executable
myScript = "examplePackage.myScript:main"

[project.gui-scripts]
# Each script named here will also generate a new executable
# Only makes a difference on Windows.
myGUI = "examplePackage.myGUI:main"

[tool.diamondpack]
mode = "app"

# Prevents specific installed packages from being reduced to only .pyc files
# Some packages complaing about this. This is a list of the MODULE's name, same as it is imported as
# NOT the pip package name
py-cache-blacklist = ["opencv"]

# Prevents specific stdlib packages from being copied to reduce package size
stdlib-blacklist = ["email", "turtle", "unittest"]

# Flag to copy required tk/tcl files
include-tk = false

# Additional data files can be copied into your distribution like this
# File globs are copied to the specified path in the dist.
# You can also just use MANIFEST.in to store data files in your wheel.
data-globs = [
    ["myData/img*.jpg", "destinationDir"],
    ["myData/data.dat", "data"]
]

# Enable some additional logging for the "app" mode
debug-logs = true

[tool.diamondpack.icons]
# Specify the .ico file for your execs named above
# Only works on Windows
myGUI = "path/myGUI.ico"

Mode can be app or script:

  • app will generate a compiled executable (requires CMake and a compiler installed)
  • script will generate a bash (Linux) or batch (Windows) script

2. Build your application into a wheel

python -m build --wheel
Check out the test folder for an example package and its pyproject.toml configuration

3. Run diamondpack

python -m diamondpack or, with a venv activated, simply run diamondpack

4. Profit

Your package will be placed in dist/[package-name]-[version]/

FAQ

Q) Do DiamondPack applications work cross-platform?
A) While DiamondPack itself is cross-platform, packaged applications are only usable in the OS they were packaged on

Q) What is that cool snake doin in that there box?
A) His name is Henry and he protects your packages

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

diamondpack-1.5.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

diamondpack-1.5.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file diamondpack-1.5.0.tar.gz.

File metadata

  • Download URL: diamondpack-1.5.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for diamondpack-1.5.0.tar.gz
Algorithm Hash digest
SHA256 c8606550a7f5317b31cc24de9d0e8bf4b0fd9d00392cf52788113ff8423050c4
MD5 70c19b265e3093a9e50eac47cd905d33
BLAKE2b-256 b6462f3d0ea20fd977f9585ca6f3d9beb1a69ca3c26b6f99cfae3ed14cc622f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for diamondpack-1.5.0.tar.gz:

Publisher: dist.yaml on alagyn/DiamondPack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file diamondpack-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: diamondpack-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for diamondpack-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 847a851d9fa4d4acd56d4809c8e337c0139d7dadbf8438813eb6bb52268143ff
MD5 c5e6bed6045ef0d4fd72bc74a7fe9fd1
BLAKE2b-256 e95bb81dbc02f75304664c8910c17e4132f019f1307613e3877b8288dad1af60

See more details on using hashes here.

Provenance

The following attestation bundles were made for diamondpack-1.5.0-py3-none-any.whl:

Publisher: dist.yaml on alagyn/DiamondPack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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