xmake Python build system (PEP 517)
Project description
xmake Python build system (PEP 517)
A python build system based on xmake to output sdist/wheel file respecting PEP517.
Related Projects
Currently, the methods to build a python wheel containing C/C++ code are as following:
- distutils: A simple C/C++ build system
written in pure python. Before python 3.13, it is one of python standard
libraries. Slow.
- setuptools: default python build system, which can use distutils to build python/C mixed project.
- scons: A C/C++ build system written in pure
python. It is very slow. So Evan Martin, the maintainer of google chrome, has
to create ninja and
switch
chrome's build system to ninja.
- enscons: A python build system based on scons. Advantage: no extra dependency except python.
- cmake: A classic C/C++ build system. A
standard in fact while bad-designed syntax.
scikit-build organization package it to
PYPI to let python developer enjoy it. cmake in PYPI uses
ninja as its backend, which is also
packaged by scikit-build organization. That means that python, cmake, ninja is
needed. Although the latter two will be installed from PYPI.
- scikit-build: first python build system based on cmake developed by scikit-build organization. Replaced by scikit-build-core.
- scikit-build-core: scikit-build organization recommends it.
- cmeel: Another wheel.
- py-build-cmake: Another wheel forked from flit.
- meson: A C/C++ build system written in pure
python. However, it uses ninja as its backend.
- meson-python: A python build system based on meson.
Except slow distutils/scons, both cmake and meson use ninja as their backend. So if a python developer want to build a python/C mixed project in high speed, ninja is the only one choice. We hope xmake can be another choice -- it should be as fast as ninja, as easy as meson, as powerful as cmake.
- xmake:
package it to PYPI.
- xmake-python: A python build system based on xmake. This project!
TODO
- get project version from
xmake.lua - provide some path (like scikit-build-core's
SKBUILD_PLATLIB_DIR) to install python binary module (XXX.cpython-313-x86_64-linux-gnu.so)
Usage
pyproject.toml:
[build-system]
requires = ["xmake-python"]
build-backend = "xmake_python"
Introduction
Python build system support build sdist, wheel and editable installation. Different from other languages, python build system is consist of two parts:
Frontends
pyproject-build/python -m build: stardard realization.uv build: the fastest frontend currently.pip wheel: pip is an incomplete frontend because build sdist is still a feature request.
In charge of:
- install required build dependencies from
build-system.requires - install optional build dependencies from the result of calling
build-system.build-backend'sget_requires_for_build_{sdist,wheel,editable}() - call
build-system.build-backend'sbuild_{sdist,wheel,editable}()
Backends
Refer some python build system backends
Backend can install optional build dependencies. For example,
scikit-build-core
will install cmake and ninja
only when cmake and ninja are not found in $PATH.
We provide two python packages. One is a
wheel for xmake, like cmake and
ninja. Another is a python build system backend, which will install xmake wheel
when xmake is not found in $PATH.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xmake_python-0.0.5.tar.gz.
File metadata
- Download URL: xmake_python-0.0.5.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
714de2dba3e7da0e769646c89f33e3bd08b4b225352025b9337e03fc738cc208
|
|
| MD5 |
d8accc3dd290ce3c1cb676b81a58b65c
|
|
| BLAKE2b-256 |
ab1e1f646f7467db6de3bca8265e819533b7a1315fcb259cdc21b7d97aeeab59
|
File details
Details for the file xmake_python-0.0.5-py3-none-any.whl.
File metadata
- Download URL: xmake_python-0.0.5-py3-none-any.whl
- Upload date:
- Size: 58.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8d2f490d69b928266e073e1852d70c2a6ead64f8cde67296a3c1f168b30d64f
|
|
| MD5 |
481fb2221c08fa513c34ea6fd9185428
|
|
| BLAKE2b-256 |
0250531b43dcfbfca70fd7ffd3572bc6cf11847eb692b77049696c074413a03e
|