generic PEP517 plugin for pybuild (alternate build+unpack, test, copy approach)
This MR is a first draft at an alternative generic PEP517 builder plugin for pybuild.
Over in !20 (closed), the approach is to:
- build = build the wheel in pybuild's {build_dir}
- test = run the tests against the wheel by putting it into the
PYTHONPATH
- install = unpack the wheel into
debian/tmp
That approach has the problem of not having scripts or entrypoints available at the testing stage.
As an alternative approach that feels more like the current setuptools approach that we are more familiar with is given here:
- build = build the wheel and install it into pybuild's {build_dir}
- test = run the tests against the unpacked/installed package (using the default pybuild approach)
- install = copy the module and scripts across into
debian/tmp
Just like MR!20, this plugin needs:
- a build-dep on python-build (>> 0.7.0)
- a build-dep on python-installer (not yet uploaded to Debian)
- build-deps on whatever back-end builder packages are listed in
pyproject.toml
This plugin was able to build a trivial PEP517 (setuptools backend) package pep517-sample
This approach has been tested with multiple supported python3 interpreters using the current python3.9/3.10 combination in experimental and worked fine. It doesn't suffer from the three problems listed as "Unresolved issues" in !20 (closed) (but no doubt there are other things to consider!)
Comments, suggestions and competing proposals that make PEP517 compliant building with pybuild Just Work gratefully accepted.