Skip to main content

No project description provided

Reason this release was yanked:

Compatible with kraken-core 0.9.0 but it's not backwards compatible with the build env has a lower version.

Project description

kraken-wrapper

Provides the krakenw command which is a wrapper around Kraken to construct an isolated and reproducible build environment.

Features

  • Produces isolated environments in PEX format
  • Reads build requirements from the .kraken.py file header
  • Produces lock files (.kraken.lock) that can be used to reconstruct an exact build environment 1)
  • Store Python package index credentials in a keychain

1) The lock files do not contain hashes for installed distributions, but only the exact version numbers from the resolved build environment.

Documentation

Table of Contents

Requirements header

If no .kraken.lock file is present, Kraken wrapper will read the header of the .kraken.py file to obtain the requirements to install into the build environment. The format of this header is demonstrated below:

# ::requirements kraken-std>=0.3.0,<0.4.0 --extra-index-url https://...
# ::pythonpath build-support

The available options are:

Option Description
#::requirements The content on this line will be parsed similar to the arguments for pip install. Every positional argument is a Python requirement specifier. The following options are supported: --index-url, --extra-index-url and --interpreter-constraint.
#::pythonpath One or more paths to prepend to sys.path when the build environment is created/executed. This is already supported by kraken-core but will be used to generate a .pth file when using the VENV environment type. The ./build-support/ will always be added to sys.path.

Environment variables

The following environment variables are handled by kraken-wrapper:

Variable Description
KRAKENW_USE If set, it will behave as if the --use flag was specified (although the --use flag if given will still take precedence over the environment variable). Can be used to enforce a certain type of build environment to use. Available values are PEX_ZIPAPP, PEX_PACKED, PEX_LOOSE and VENV (default).
KRAKENW_REINSTALL If set to 1, behaves as if --reinstall was specified.
KRAKENW_INCREMENTAL If set to 1, virtual environment build environments are "incremental", i.e. they will be reused if they already exist and their installed distributions will be upgraded.

Recommendations

Index credentials

Pip doesn't really have a good way to globally configure credentials for Python package indexes when they are not configured as an alias in .piprc aside from ~/.netrc. Both of these methods have the drawback that the password is stored in plain text on disk. Pip does technically support looking up a password from the system keychain using the keyring package, but it doesn't store the username and so will have to ask for it via stdin.

To work around this limitation, kraken-wrapper offers the auth command which allows you to configure credentials where the username is stored in ~/.config/krakenw/config.toml and the password is stored in the system keychain (also using the keyring package).

$ krakenw auth example.jfrog.io -u my@email.org 
Password for my@email.org:

Important note: If no backend for the keyring package is available, kraken-wrapper will fall back to writing the password as plain text into the same configuration file.

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-wrapper-0.1.21.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

kraken_wrapper-0.1.21-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file kraken-wrapper-0.1.21.tar.gz.

File metadata

  • Download URL: kraken-wrapper-0.1.21.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.2

File hashes

Hashes for kraken-wrapper-0.1.21.tar.gz
Algorithm Hash digest
SHA256 f7c86fce3cb6855fbd1ec7ea41c4dd23ee1737a49b48f0e95fc0af0420ab741f
MD5 dc6c91a2e05b2d7a27492b6298c8c383
BLAKE2b-256 91165b29f8d93e2ed5d7c11a66020c5a0016284b14f8b5d6634505b13f96eb81

See more details on using hashes here.

File details

Details for the file kraken_wrapper-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: kraken_wrapper-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.6.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.2

File hashes

Hashes for kraken_wrapper-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 ad07c1d1e5fcb910c351028275f10573be356d377365067a6dfb468f4328c6de
MD5 9f4efb1ef07db1d54cd5d49934061f58
BLAKE2b-256 126098bc9c324acda2f632434e7a52d80b2b98e2922f4b27beddee88d9557a1e

See more details on using hashes here.

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