Crate pyo3_pack[][src]

Builds wheels from a crate that exposes python bindings through pyo3

The high-level api is BuildContext, which internally calls [build_rust()] and [build_wheel()].

Cargo features

  • auditwheel: Reimplements the more important part of the auditwheel package in rust. This feature is enabled by default and means that every wheel is check unless skip_auditwheel is set to true.

  • sdist: Allows creating sdist archives. Those archives can not be installed yet, since (at least in the current 10.0.1) doesn't implement PEP 517 and pyo3-pack doesn't implement the build backend api from that PEP. It is therefore disabled by default. It also currently requires nightly as it uses pyo3 for bindings and setting the crate type for lib to rlib and cdylib.

Structs

BuildContext

Contains all the metadata required to build the crate

BuildOptions

High level API for building wheels from a crate which can be also used for the CLI

CargoToml

Extract of the Cargo.toml that can be reused for the python metadata

Metadata21

Python Package Metadata 2.1 as specified in https://packaging.python.org/specifications/core-metadata/

PythonInterpreter

The location and version of an interpreter

Registry

A pip registry such as pypi or testpypi with associated credentials, used for uploading wheels

Target

The part of the current platform that is relevant when building wheels and is supported

WheelMetadata

The metadata required to generate the .dist-info directory

Enums

AuditWheelError

Error raised duing auditing an elf file for manylinux compatibility

UploadError

Error type for different types of errors that can happen when uploading a wheel.

Functions

auditwheel_rs

An (incomplete) reimplementation of auditwheel, which checks elf files for manylinux compliance

compile

Builds the rust crate into a native module (i.e. an .so or .dll) for a specific python version

develop

Installs a crate by compiling it and copying the shared library to the right directory

upload

Uploads a single wheel to the registry

upload_wheels

Uploads all given wheels to the registry