tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Python modules update: please use wheel.mk
On Sat, 28 Oct 2023 at 21:05, Thomas Klausner <wiz%netbsd.org@localhost> wrote:
>
> Hi!
>
> I've just finished the conversion of Python modules in pkgsrc to
> follow the best-practice for bootstrapping and then building modules
> (AFAICT).
>
> From the Python packaging discourse, the recommended method is:
>
> Bootstrap using 'flit_core' (for building wheels, has no module
> dependencies), then build 'installer' (for installing wheels, needs
> 'flit_core'). Finally, build 'build' (has ~ 5 dependencies).
>
> Then use 'build' and 'installer' for all other packages.
>
> I've added lang/python/bootstrap.mk with rules for the packages that
> 'build' needs and 'build' itself.
>
> Then I've changed lang/python/wheel.mk to switch to using 'build' (was
> already the case) and 'installer' (was using 'pip') for building and
> installing packages. The switch from 'pip' to 'installer' caused the
> PLISTs to change (less metadata installed, but *.pyo installed again).
>
> When you update any Python package, please consider switching it to
> wheel.mk. You might need to add TOOL_DEPENDS for the build backend
> used by the package (e.g., py-setuptools, py-flit_core, py-hatchling,
> ... - there are lots, check the modules's pyproject.toml file) and
> perhaps on py-wheel too.
Thanks for all the work on this - it's good to see pkgsrc able to more
closely follow Python's best practices (rather than having to fight
cross-current :)
Would there be any useful tests which could be added to pkglint to
trigger for packages suitable for switching to wheel.mk?
Thanks
David
Home |
Main Index |
Thread Index |
Old Index