pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wheel.mk & setuptools: py-wheel mostly unneeded nowadays



Thomas Klausner <wiz%NetBSD.org@localhost> writes:

> On Mon, Nov 11, 2024 at 12:46:29PM -0500, Greg Troxel wrote:
>> I wonder if wheel.mk should have variables that define the needed tools,
>> and default to TOOL_DEPENDINGing on setuptools.  But I am very much
>> non-expert about py-building-stuff.
>
> I thought about that but it would probably look like
>
> PYTHON_BUILD_FRAMEWORK=	 setuptools
>
> instead of
>
> TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
>
> and I'm not sure it's much easier (yes, we could ?= default it to
> setuptools).

I think that's better, because it's one word instead of a big expression
that is just copy/pasted.  It's even better with ?=setuptools as then
the client Makefile is simpler, and it seems like that might be 90%.
(Probably need a 'none' option for "it's odd; I'll DEPEND myself".)

> Another idea would be to put the "${MV} foo foo-${PYVERSSUFFIX}" into
> variables instead, something like
>
> PYTHON_VERSIONED_BINARIES=   bin/foo

That seems like an improvement too.

I see this all as "common subexpresion elimination", and I feel that
anytime people are copy/pasting things that's a clue.

Perhaps PYTHON_BUILD_FRAMEWORK defaulting to none, and people can opt
into it, removing TOOL_DEPENDS, to avoid breakage and a mass edit.
But, it might be that defaulting to TOOL_DEPENDS on setuptools, and
fixing up things that break will get us to a better place faster,
although maybe best left until post-2024Q4.


Home | Main Index | Thread Index | Old Index