pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: using bob to build for several hosts, python versions again
* On 2026-07-31 at 00:25 BST, Greg Troxel wrote:
As an example I have
py313-certbot
installed. That leads to
security/py-certbot
which leads to building certbot for every pyversion, and all of the
dependencies for every pyversion.
It seems there should be some mechanism for this. I tried putting
security/py313-certbot in the pkgpaths file, but unsurprisingly that did
not go well.
I think the root of the trouble is that PKGPATH and PKGNAME are both
partial, and we don't have a way to specify both at once, someting like
security/py-certbot PYTHON_VERSION_REQD=313
I realize I can set something to default to only 313, but I might have
some package where I want 314 for it.
Am I missing something, or is it just not possible to deal with this
reasonably right now?
I think from a bob perspective, this kind of configuration definitely
belongs in pkgsrc land, and I'd be very hesitant to try and start adding
things to bob to support it.
The way I'd do this is to have a small bit of logic in your script that
generates the correct mk.conf for this setup. For example, you can use
"pkg_info -Q" to get information from the existing package (taking one
at random from my system):
$ pkg_info -Q PKGPATH py313-paramiko
security/py-paramiko
$ pkg_info -Q MULTI py313-paramiko
PYTHON_VERSION_REQD=313
$ pkg_info -Q PYTHON_VERSION_DEFAULT py313-paramiko
313
(one of the difficulties here is that the variables won't be
standardised, I have MULTI because the package was built with bob (you'd
have it with pbulk too), basically have a look at pkg_info -B and see
what you can dig out for your particular package metadata - if you don't
have anything at all then it's possible we should add a marker to pkgsrc)
and then expand that out into your mk.conf with something like:
.if ${PKGPATH} == "security/py-paramiko"
PYTHON_VERSION_REQD= 313
.endif
or even better, have an input list of package values that you could put
in a .include file for easier sort'ing and uniq'ing:
PYVER.security/py-paramiko= 313
PYVER.security.py-certbot= 314
...
and then have a small bit in your mk.conf:
.if defined(PYVER.${PKGPATH})
PYTHON_VERSION_REQD= ${PYVER.${PKGPATH}}
.endif
That way it still works as you would expect in any builds, not just bob
environments.
--
Jonathan Perkin pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index