Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest running abi3audit in docs #1347

Merged
merged 4 commits into from Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/faq.md
Expand Up @@ -118,6 +118,8 @@ The CPython Limited API is a subset of the Python C Extension API that's declare

To create a package that builds ABI3 wheels, you'll need to configure your build backend to compile libraries correctly create wheels with the right tags. [Check this repo](https://github.com/joerick/python-abi3-package-sample) for an example of how to do this with setuptools.

You could also consider running [abi3audit](https://github.com/trailofbits/abi3audit) against the produced wheels in order to check for abi3 violations or inconsistencies.
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved

### Packages with optional C extensions {: #optional-extensions}

`cibuildwheel` defines the environment variable `CIBUILDWHEEL` to the value `1` allowing projects for which the C extension is optional to make it mandatory when building wheels.
Expand Down
6 changes: 5 additions & 1 deletion docs/options.md
Expand Up @@ -893,9 +893,11 @@ Platform-specific environment variables are also available:<br/>
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair --lib-sdir . -w {dest_dir} {wheel}"

# Multi-line example - use && to join on all platforms
# Use abi3audit to catch issues with Limited API wheels
CIBW_REPAIR_WHEEL_COMMAND: >
python scripts/repair_wheel.py -w {dest_dir} {wheel} &&
python scripts/check_repaired_wheel.py -w {dest_dir} {wheel}
python scripts/check_repaired_wheel.py -w {dest_dir} {wheel} &&
pipx run abi3audit --strict --report {wheel}
```

!!! tab examples "pyproject.toml"
Expand All @@ -915,10 +917,12 @@ Platform-specific environment variables are also available:<br/>
repair-wheel-command = "auditwheel repair --lib-sdir . -w {dest_dir} {wheel}"

# Multi-line example
# Use abi3audit to catch issues with Limited API wheels
[tool.cibuildwheel]
repair-wheel-command = [
'python scripts/repair_wheel.py -w {dest_dir} {wheel}',
'python scripts/check_repaired_wheel.py -w {dest_dir} {wheel}',
'pipx run abi3audit --strict --report {wheel}',
]
joerick marked this conversation as resolved.
Show resolved Hide resolved
```

Expand Down