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"

[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.
data-globs = [
    ["myData/img*.jpg", "destinationDir"],
    ["myData/data.dat", "data"]
]

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

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.4.5.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

diamondpack-1.4.5-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: diamondpack-1.4.5.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for diamondpack-1.4.5.tar.gz
Algorithm Hash digest
SHA256 3bd5200081f0c4448da5f115e2ad91a090b58428c33ebf9c98d377d9dfced213
MD5 b2123d11a030ba76e075c43d46a224d3
BLAKE2b-256 1efc422a5202902e9c2449dd508293848b4867b2b2452ba28272d5684319e4dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: diamondpack-1.4.5-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for diamondpack-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1b0db2e2148a00f2efe1bca4d51e6950d4736bc460e7eb36a357527644113766
MD5 87ff28e0d37e307dac95c4c57b1f1403
BLAKE2b-256 ce06bd7e5305e68a1d1a22ca37f07eb1b970c9ada3de9643f1f093c78702cc8e

See more details on using hashes here.

Supported by

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