Skip to main content

Create Wheel from CMake projects

Project description

CMake Wheel: cmeel

PyPI version pre-commit.ci status Documentation Status

Ruff uv

Wheel build backend using CMake, to package any CMake project with pip and distribute on PyPI.

Following those relevant PEPs:

  • PEP 427, The Wheel Binary Package Format 1.0
  • PEP 517, A build-system independent format for source trees
  • PEP 518, Specifying Minimum Build System Requirements for Python Projects
  • PEP 600, Future ‘manylinux’ Platform Tags for Portable Linux Built Distributions
  • PEP 621, Storing project metadata in pyproject.toml
  • PEP 639, Improving License Clarity with Better Package Metadata
  • PEP 660, Editable installs for pyproject.toml based builds (wheel based)

Chat

https://matrix.to/#/#cmake-wheel:matrix.org

Basic idea

Glue between PEP 517 & 660 entry points and modern CMake standard project configuration / build / test / install, and install in ${PYTHON_SITELIB}/cmeel.prefix/:

  • As there is a dot, it is not a valid python module name, so no risk of importing anything there by mistake
  • Play well with others, as everything is confined to ${PYTHON_SITELIB}/cmeel.prefix
  • ${PYTHON_SITELIB}/cmeel.pth automatically load ${PYTHON_SITELIB}/cmeel.prefix/${PYTHON_SITELIB}, so python packages work out of the box
  • Existing ${PYTHON_SITELIB}/cmeel.prefix are automatically added to $CMAKE_PREFIX_PATH, so we can build CMake packages whose dependencies are provided by other packages installed with cmeel
  • Stuff in ${PYTHON_SITELIB}/cmeel.prefix/bin is exposed via cmeel.run:cmeel_run, or copied if start with a shebang

Basic pyproject.toml example

extract from https://github.com/cmake-wheel/cmeel-example/blob/main/pyproject.toml:

[build-system]
build-backend = "cmeel"
requires = ["cmeel[build]"]

[project]
authors = [{email = "guilhem.saurel@laas.fr", name = "Guilhem Saurel"}]
description = "This is an example project, to show how to use cmeel"
license = "BSD-2-Clause"
name = "cmeel-example"
requires-python = ">= 3.8"
version = "0.7.0"

[project.urls]
changelog = "https://github.com/cmake-wheel/cmeel-example/blob/main/CHANGELOG.md"
homepage = "https://github.com/cmake-wheel/cmeel-example"
repository = "https://github.com/cmake-wheel/cmeel-example.git"

Complete specification is available at: https://packaging.python.org/en/latest/specifications/declaring-project-metadata

Install

If you want to use the helpers provided by cmeel, to eg. test building a project in a manylinux container with cmeel docker, the best way to install cmeel is to use pipx: pipx install cmeel

Otherwise, if you just want to use the build backend, there is no need to install anything: your frontent (eg. pip) should do this for you

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

cmeel-0.60.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

cmeel-0.60.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file cmeel-0.60.1.tar.gz.

File metadata

  • Download URL: cmeel-0.60.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cmeel-0.60.1.tar.gz
Algorithm Hash digest
SHA256 3e0b92eb933a3693ad3f1da8aae31defcbee5f25969daaf20e59c57d6a9474cf
MD5 7afb6aacd45c4d9a6eeb8de49d4e404d
BLAKE2b-256 5446ddc7df697e49cae32b1a97b3e1a3b47b815238f9059312f987bc62a2e756

See more details on using hashes here.

Provenance

The following attestation bundles were made for cmeel-0.60.1.tar.gz:

Publisher: release.yml on cmake-wheel/cmeel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cmeel-0.60.1-py3-none-any.whl.

File metadata

  • Download URL: cmeel-0.60.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cmeel-0.60.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f92b68353a58b4d6b5a664ea96bf58a3fef0891a8ed570d3c153361bbbb94b7
MD5 cd9b0c51a8be17a861737694ac24be18
BLAKE2b-256 da39f2db2ff475d42222c70fe25c737028aeaafdd9c0aeba04e6b2dc66e7f93f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cmeel-0.60.1-py3-none-any.whl:

Publisher: release.yml on cmake-wheel/cmeel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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