Important
This is work in progress and might change in nature!
poudriere-develinstalledpython3installedpy-wheel(wheelcommand) installed; required to normalize and deduplicate wheels, see below
-
Apply this patch to your ports tree
-
Add
PYDISTUTILS_BUILD_WHEEL=yesto yourmake.conf, PEP 517-based wheels are built by default -
Copy the hooks from
src/to${POUDRIERED}/hooks/plugins/python-wheels/ -
Add
NO_PACKAGE_BUILDING=yes ; export PROCESS_PYTHON_WHEELS=yesto yourpoudriere.conf -
If you build with
-b <branch>(or otherwise setPACKAGE_FETCH_BRANCHin yourpoudriere.conf), add at leastPACKAGE_FETCH_BLACKLIST="py<PYTHON_SUFFIX>-*"or explicit non-prefixed package names (not all packages are prefixed) to yourpoudriere.conf, since fetching a prebuilt package instead of building locally skips the wheel-collection hook entirely -
By default only ports listed explicitly on the build command line/list file are collected, not automatic (transitive) dependencies; add
export PYTHON_WHEELS_SCOPE=allto yourpoudriere.confto collect wheels for every built port instead -
If you want a static simple index being generated, add
export GENERATE_STATIC_INDEX=yesto yourpoudriere.conf -
If you are running ZFS, optionally create the Python wheels dataset:
zfs create -o compression=off ${ZPOOL}${ZROOTFS}/data/python-wheels
Run your poudriere build as usual, as soon as a Python package is built it will:
- in case of distutils build the wheel,
- in case of PEP 517 the wheel is already built, since
PEP517_BUILD_CMDruns automatically as part of the port's normal build phase (no opt-in required, unlikePYDISTUTILS_BUILD_WHEELfor distutils).
Poudriere will process the wheels by
- collecting them after successful package build from the port's work directory,
- discarding a freshly built wheel whose content is unchanged from the last one published for the same name, version, and Python/ABI/platform (a rebuild triggered by e.g. a
PORTREVISIONbump or an unrelated dependency/option change frequently produces byte-identical wheels), - adding a build tag to wheels whose content actually changed,
- adding multiplatform tags to wheels for RELEASE versions with patches from p-2 to p (three in total),
- generating a static simple index
Your wheels are ready to be served by a web server.