libpsl, python and dependecies

Joshua Root jmr at macports.org
Thu Jul 2 08:00:06 UTC 2026


On 2/7/2026 16:35, Vincent Habchi wrote:
>> On 2 Jul 2026, at 08:20, Joshua Root <jmr at macports.org> wrote:
>>
>> On 2/7/2026 15:44, Vincent Habchi wrote:
>>> PS: That being said, I’ll try and write the port group file allowing for automatic Python variant generation.
>> Have a look at e.g. xorg-xcb-proto for how to generate an arbitrary number of variants.
> 
> Yeah, I had already written code like that for QGis, I think, back in the days.
> 
>> The complication is that different ports will need to run different code when the variants are set.
> 
> What do you mean exactly?

Some ports will want to do this:

variant python314 {
	depends_build-append    port:python314
	configure.python ${prefix}/bin/python3.14
}

Others may want to do this:

variant python314 {
	python.default_version	314
}

Still others may want to do this (example from alembic):
variant python314 {
	depends_lib-append      port:python314

         post-patch {
             patch_pyalembic_files 314
         }

         configure.args-append   -DUSE_PYALEMBIC=ON \
  
-DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python3.14
}

Some may want to set license_noconflict to the python that is being 
used, like xorg-xcb-proto.

The point is just that creating the variants is one thing, and knowing 
what to do when they are set is quite another. There's no generic python 
variant body that will work in all cases.

- Josh


More information about the macports-dev mailing list