tech-pkg archive

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

Re: un-self-conficting python packages for non-default python



On Tue, Dec 19, 2023 at 02:18:07AM +0100, Dr. Thomas Orgis wrote:
> I carry some local patches that apply a common pattern to enable me
> building the same set of packages with differing python versions. My
> scripted builds have a selection of packages and a selection of python
> versions, all py-foo packages being built with all respective
> PYTHON_VERSION_REQD values.
> 
> I need to avoid installing unversioned files, except for the default
> python version. The non-default builds might be not very useful (in
> case the unversioned file in $PREFIX/bin is the whole point), but it's
> nasty having to guess if a package using the py-foo scheme with
> changing names depending on configured python version is actually
> installable in parallel with differing pythons.

In pkgsrc, such packages (that conflict with other Python versions of
themselves) should be marked with PYTHON_SELF_CONFLICT=yes.

The usual workaround is to rename the binaries from foo to
foo-${PYVERSSUFFIX} and add an ALTERNATIVES files that provides 'foo'
(if you have pkg_alternatives installed); and patch other packages
that call this at build/run time to expect foo-${PYVERSSUFFIX} instead
of foo.

Do you have cases where this is not sufficient?
 Thomas


Home | Main Index | Thread Index | Old Index