Add custom build backend to support build args (#328)

This implements a custom build backend, inspired by the
[solution used by Pillow.](https://github.com/python-pillow/Pillow/pull/7171)

install-option is deprecated and was removed with pip 23.1. The
comonly accepted solution seems to be to define a custom build
backend for now
https://github.com/pypa/setuptools/issues/2491#issuecomment-1589764230

This commit changes the usage from `--install-option` to `--config-settings`.
This commit is contained in:
Tobias Ahrens
2023-10-03 07:30:51 +02:00
committed by GitHub
parent db26d60283
commit d48ffea939
7 changed files with 77 additions and 50 deletions

View File

@@ -15,8 +15,8 @@ To force rebuilding the pip package from source (you'll need requirments.txt or
To force bundling libcapnp (or force system libcapnp), just in case setup.py isn't doing the right thing::
pip install --no-binary :all: --install-option "--force-bundled-libcapnp"
pip install --no-binary :all: --install-option "--force-system-libcapnp"
pip install --no-binary :all: -C force-bundled-libcapnp=True
pip install --no-binary :all: -C force-system-libcapnp=True
If you're using an older Linux distro (e.g. CentOS 6) you many need to set `LDFLAGS="-Wl,--no-as-needed -lrt"`::
@@ -24,7 +24,7 @@ If you're using an older Linux distro (e.g. CentOS 6) you many need to set `LDFL
It's also possible to specify the libcapnp url when bundling (this may not work, there be dragons)::
pip install --no-binary :all: --install-option "--force-bundled-libcapnp" --install-option "--libcapnp-url" --install-option "https://github.com/capnproto/capnproto/archive/master.tar.gz"
pip install --no-binary :all: -C force-bundled-libcapnp=True -C libcapnp-url="https://github.com/capnproto/capnproto/archive/master.tar.gz"
From Source
-----------