Create Wheel from CMake projects
Project description
CMake Wheel: cmeel
Wheel build backend using CMake, to package anything 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, DRAFT
- 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
This 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 viacmeel.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:
[project]
name = "cmeel-example"
version = "0.4.12"
description = "This is an example project, to show how to use cmeel"
requires-python = ">= 3.7"
license = "BSD-2-Clause"
authors = [{name = "Guilhem Saurel", email = "guilhem.saurel@laas.fr"}]
[project.urls]
homepage = "https://github.com/cmake-wheel/cmeel-example"
repository = "https://github.com/cmake-wheel/cmeel-example.git"
changelog = "https://github.com/cmake-wheel/cmeel-example/blob/main/CHANGELOG.md"
[build-system]
requires = ["cmeel[build]"]
build-backend = "cmeel"
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
Built Distribution
File details
Details for the file cmeel-0.53.3.tar.gz
.
File metadata
- Download URL: cmeel-0.53.3.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f40761e3b997910d5a3153a35d9635c3bc849fc21a79a8b57d67a3617006d359 |
|
MD5 | 311fe62113ad35ffd7fa61ab4472c5bd |
|
BLAKE2b-256 | b2754883d3994945a6ae8d24a4e130b6b2144d06b7041ab99eb8331464b9c839 |
File details
Details for the file cmeel-0.53.3-py3-none-any.whl
.
File metadata
- Download URL: cmeel-0.53.3-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26472fa9d57610cc5cb2c2ed0911b272b928e9e580a9d3c51e3ca90a919f3fad |
|
MD5 | 2becbdfebf5ba47ae8def68fc7ea6b75 |
|
BLAKE2b-256 | 4622774a41b02269f6f0c521cf4fcf5b32536e0906256da6c284a093c7262ce6 |