Skip to main content

bork Build Status PyPI Documentation Status

A frontend for building and releasing PEP 517 compliant projects, including support for generating a ZipApp.

Includes a basic task runner, in the form of bork run <task name>. Tasks are defined in your pyproject.toml file.

Bork requires Python 3.11 or newer.

Installation

$ pip3 install bork

Or download the latest zipapp releases

Usage

Example usage information is provided below. Additional documentation can be found at bork.readthedocs.io.

Building and Releasing

Assuming a project is PEP 517 compliant, you can just do:

$ bork clean # Remove anything in build/, dist/, *.egg-info/
$ bork build # Build the project
$ bork release # Release to PyPI and, optionally, GitHub

ZipApp Support

If you want to build a ZipApp, add this to your pyproject.toml:

[tool.bork.zipapp]
enabled = true
main = "<entrypoint>"

Where <entrypoint> is of the form "module.submodule:function", and may be equivalent to a console_script entrypoint in setup.cfg.

Uploading To GitHub Releases

If you want to upload assets to GitHub Releases, you can add the following configuration to your pyproject.toml:

[project]
name = "<project name>"

[tool.bork.release]
# If true, release to PyPi; otherwise, don't.
pypi = true
# If true, release to GitHub; otherwise, don't.
github = true # release to GitHub
# GitHub repository, e.g. "duckinator/bork".
github_repository = "<owner>/<repo>"
# List of file globs to include in GitHub Releases.
github_release_globs = ["dist/*.pyz", "dist/*.whl"]
# If true, zipapps are named "<name>.pyz", otherwise "<name>-<version>.pyz".
strip_zipapp_version = true

Aliases (Basic task runner)

Bork includes a very basic task runner, for single-line commands.

As an example, here is what Bork uses:

[tool.bork.aliases]
lint = [
    "pylint bork tests",
    "mypy bork",
]
# Runs all tests.
test = "pytest --verbose"
# Runs fast tests.
test-fast = "pytest --verbose -m 'not slow'"
# Runs slow tests.
test-slow = "pytest --verbose -m slow"
# Build docs
docs = "mkdocs build"

Then you can run bork aliases to get the list of aliases:

~/bork$ bork aliases
lint
test
test-fast
test-slow
~/bork$

And run bork run <alias> to run that alias:

~/bork$ bork run docs
mkdocs build
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory: /usr/home/puppy/bork/site
INFO     -  Documentation built in 0.25 seconds
~/bork$

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/duckinator/bork. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

The code for Bork is available under the MIT License.

Release files for bork 11.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bork 11.0.0
File Size Uploaded
bork-11.0.0.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bork 11.0.0
File Interpreter ABI Platform
bork-11.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.4 kB

Release files / bork-11.0.0.tar.gz

Download URL bork-11.0.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
242dda2b2a100dc84b2b5527bc231a52b4a3b23c5051cd54a9163911ebdd4469
BLAKE2b-256 checksum
How to use checksums
8b258344e39ced7c42667595e3bfb374a258c895949813323c20ead1b1155d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via bork/11.0.0 (+https://github.com/duckinator/bork)

Release files / bork-11.0.0-py3-none-any.whl

Download URL bork-11.0.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71e6ed42786b8a0a1159eae65cec6ef2a44aee396031bb029e6716d68fe34e48
BLAKE2b-256 checksum
How to use checksums
a64b0131098972f506f8bb2780c59becca8f4b710a55cce1e5d8cf0e73a3ecd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via bork/11.0.0 (+https://github.com/duckinator/bork)
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page