feat: support pypa build (#521)
* feat: support pypa build fix: update `cibuildwheel.linux.troubleshoot` to know about build Workaround issue with PyPy venv module by installing build[virtualenv] fix: test_dependency_constraints_file when using build fix: test/test_pep518.py fix: use `strtobool` to parse `CIBW_PYPA_BUILD` fix: update `cibuildwheel.linux.troubleshoot` to know about `python -m pip wheel` test: use `build_mode` in `test/test_dependency_versions.py` tests * refactor: use build-backend instead * Apply suggestions from code review Co-authored-by: Joe Rickerby <joerick@mac.com> * refactor: use literal types for build_frontend * refactor(tests): build_mode -> build_frontend_env * Update test/test_before_build.py Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Joe Rickerby
parent
9e1369e07d
commit
515e9be2c4
@@ -435,6 +435,45 @@ This option can also be set using the [command-line option](#command-line) `--pr
|
||||
|
||||
## Build customization
|
||||
|
||||
### `CIBW_BUILD_FRONTEND` {: #build-frontend}
|
||||
> Set the tool to use to build, either "pip" (default for now) or "build"
|
||||
|
||||
Choose which build backend to use. Can either be "pip", which will run
|
||||
`python -m pip wheel`, or "build", which will run `python -m build --wheel`.
|
||||
|
||||
!!! tip
|
||||
Until v2.0.0, [pip] was the only way to build wheels, and is still the
|
||||
default. However, we expect that at some point in the future, cibuildwheel
|
||||
will change the default to [build], in line with the PyPA's recommendation.
|
||||
If you want to try `build` before this, you can use this option.
|
||||
|
||||
[pip]: https://pip.pypa.io/en/stable/cli/pip_wheel/
|
||||
[build]: https://github.com/pypa/build/
|
||||
|
||||
#### Examples
|
||||
|
||||
!!! tab examples "Environment variables"
|
||||
|
||||
```yaml
|
||||
# Switch to using build
|
||||
CIBW_BUILD_FRONTEND: "build"
|
||||
|
||||
# Ensure pip is used even if the default changes in the future
|
||||
CIBW_BUILD_FRONTEND: "pip"
|
||||
```
|
||||
|
||||
!!! tab examples "pyproject.toml"
|
||||
|
||||
```toml
|
||||
[tool.cibuildwheel]
|
||||
# Switch to using build
|
||||
build-frontend = "build"
|
||||
|
||||
# Ensure pip is used even if the default changes in the future
|
||||
build-frontend = "pip"
|
||||
```
|
||||
|
||||
|
||||
### `CIBW_ENVIRONMENT` {: #environment}
|
||||
> Set environment variables needed during the build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user