Skip to main content

No project description provided

Project description

The Kraken build system

kraken-logo

Python PyPI version Documentation

Kraken is a build system, but not in the traditional sense. It's focus is on the orchestration of high-level tasks, such as organization of your repository configuration, code generation, invoking other build systems, etc. It is not a replacement for tools like Poetry, Cargo or CMake.

Requirements

  • CPython 3.10+

Getting started

Currently, Kraken's OSS components are not very well documented and do not provide a convenient way to get started. However, if you really want to try it, you can use the following steps:

  1. Install kraken-wrapper (e.g. with Pipx) to get access to the krakenw command-line tool.

  2. Create a .kraken.py script in your project's root directory.

    from kraken.common import buildscript
    buildscript(requirements=["kraken-build==0.32.3"])
    
    from kraken.std.python import mypy, black, isort
    mypy()
    black()
    isort()
    
  3. Run krakenw lock to install kraken-build for your project in build/.kraken/venv and generate a kraken.lock file.

  4. Run krakenw run lint to run the linters.

Note that you can also use the kraken CLI (instead of krakenw), however this will disregard the buildscript() function, will not use the lock file and will use the version of Kraken that was installed globally.

How-to's

Upgrade a project's lock file

To upgrade a project's lock file, run krakenw lock --upgrade. This will upgrade all dependencies to the latest available version. If you want to upgrade based on updated constraints in .kraken.py without installing from scratch, add the --incremental flag or set KRAKENW_INCREMENTAL=1.

Development

This repository uses Slap to manage the Python project. After installing Slap with Pipx, run the following to install Kraken for development.

$ slap venv -c --python python3.10
$ slap install --link
# If you have the Slap shell magic installed, it will activate the Venv in your shell.
$ slap venv -a

You may want to use a released version of krakenw to interact in the repository however:

$ krakenw run python.install
$ krakenw run fmt lint test

Releases

A release must be created by a maintainer that has write access to the develop branch. The release process is automated using Slap.

$ slap release -tp <patch|minor|major|x.y.z>
$ slap publish

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kraken_build-0.37.0.tar.gz (179.5 kB view details)

Uploaded Source

Built Distribution

kraken_build-0.37.0-py3-none-any.whl (249.8 kB view details)

Uploaded Python 3

File details

Details for the file kraken_build-0.37.0.tar.gz.

File metadata

  • Download URL: kraken_build-0.37.0.tar.gz
  • Upload date:
  • Size: 179.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for kraken_build-0.37.0.tar.gz
Algorithm Hash digest
SHA256 51e2877ae44a7eeeabfd45785bcb456b46add63bea13d6e0849016284c726f8e
MD5 27f2ff82f8aea91da0c787e6d060be1e
BLAKE2b-256 a7cde1638b66f577a4fea2aa5e3a0d77cc6d7182019bd6e48380477b6d0c2e09

See more details on using hashes here.

File details

Details for the file kraken_build-0.37.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kraken_build-0.37.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a6f3926f04a70e0f77d891ba162c4cff3cd3abe6ad22dccadab095cc7624dd7
MD5 59b7cb3b64bfd30019e067897d4ce782
BLAKE2b-256 c12010c7c8264dac1c5c62adbebb87bf36516474287cb0d74c23417788120a4e

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