Skip to main content

Modify an environment to build and bundle a Python package into a manylinux wheel.

Project description

cheese chef

little-cheesemonger

little-cheesemonger is a package that can set up a manylinux build environment to compile a correctly linked manylinux wheel. Configuration data is loaded from a pyproject.toml file, or a custom data loader can be implemented.

Installation

pip install little-cheesemonger==0.2.0

Quickstart

To trigger environment setup, either run little-cheesemonger from the root directory of a package, or pass the path to the package you want compiled. The package must contain configuration data in its pyproject.toml file for environment setup to work.

little-cheesemonger path/to/package

Default Configuration

The manylinux image version is controlled by last section of the configuration heading. The latest tag is always used.

[tool.little-cheesemonger.manylinux2014_x86_64]
environment_variables = [
  "FOO=BAR"
]
system_dependencies = [
  "atlas"
]
python_dependencies = [
  "nyancat==0.1.2"
]
python_versions = [
  "cp36-cp36m"
  "cp38-cp38"
]
steps = [
  "touch /foobar.txt"
]
  • environment_variables is a list of environment variables to set in the container prior to building the wheel. They are expected to be in KEY=VALUE format.
  • system_dependencies is a list of CentOS system dependencies to install via YUM. They are expected to be in package-version format.
  • python_dependencies is a list of Python dependencies to install via pip. They are expected to be in package==version format. They are currently installed for all available versions of Python in a given manylinux image.
  • python_versions is a list of Python versions to install Python dependencies for in a given manylinux image. They are expected to follow the Python installation directory naming convention from in the specified manyliniux image, ex. cp36-cp36m. Python version names can be found by running ls /opt/python in a manylinux image.
  • steps is a list of steps to execute via bash. Package building and uploading could be implemented here, or little-cheesemonger could be integrated into a larger system!

Custom Data Loader

You can pass the path to an importable function, as well as positional and keyword arguments to little-cheesemonger to customize how configuration data is loaded.

little-cheesemonger --data-loader path.to.function --loader-arg foo --loader-kwarg foo=bar

Custom data loader functions must accept directory as the first argument with positional and keyword arguments passed to the loader function after. The function must return a dictionary of configuration data matching the fields above.

def my_custom_loader(directory: Path, ...) -> Dict:
  pass

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

little-cheesemonger-0.2.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

little_cheesemonger-0.2.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file little-cheesemonger-0.2.0.tar.gz.

File metadata

  • Download URL: little-cheesemonger-0.2.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for little-cheesemonger-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eebd93abeb548c23460f2ec8dcf5f6d555549ea40b5c05ec3dcd7bbe186032da
MD5 453712d98a91ce9be2ca3f8e2c36964e
BLAKE2b-256 4c445b24df7e3920848c59adfb77a86d4cb97f3e3ba612ab48e2cbdd7a0e1049

See more details on using hashes here.

File details

Details for the file little_cheesemonger-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: little_cheesemonger-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for little_cheesemonger-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 595b71ecda1cf2aefe900d6e463a77bc2eddaaa085f7253888481ed596fe9797
MD5 9788127b8268f32f76e0d55ee511ebda
BLAKE2b-256 71c2d195136e1a5e79522fa34d9146e058a8c93b024648d3bd3e44cb6430f5e2

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