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 08:30:04AM +0100, Dr. Thomas Orgis wrote:
> Am Tue, 19 Dec 2023 06:52:25 +0100
> schrieb Thomas Klausner <wiz%gatalith.at@localhost>:
> 
> > 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?
> 
> I have to pedal back from my earlier answer. Looking at an older install that I did with python38 intitially and then added python39 on user request, I see this:
> 
> $ cat /sw/env/gcc-10.3.0_openmpi-4.1.1/pkgsrc/2022Q1/pkgdb/py3{8,9}-pybind11-2.9.1/+REQUIRED_BY 
> py38-scipy-1.7.3nb1
> py39-scipy-1.7.3nb1
> 
> $ cat /sw/env/gcc-10.3.0_openmpi-4.1.1/pkgsrc/2022Q1/pkgdb/py3{8,9}-cairo-1.20.1nb1/+REQUIRED_BY 
> py38-gobject3-3.42.0
> py38-matplotlib-3.4.3nb1
> py39-matplotlib-3.4.3nb1
> 
> So the gobject dependency entered via default python somewhere along
> the software stack, but I explicitly install scipy and matplotlib for
> folks to use. Those mean that py-pybind11 and py-cairo should not
> conflict.
> 
> It's simply $PREFIX/bin/pybind11-config here. It can do this:
> 
> usage: pybind11-config [-h] [--includes] [--cmakedir]
> 
> optional arguments:
>   -h, --help  show this help message and exit
>   --includes  Include flags for both pybind11 and Python headers.
>   --cmakedir  Print the CMake module directory, ideal for setting -Dpybind11_ROOT in CMake.
> 
> I'd assume matplotlib doesn't care about using this, as some
> Python+CMake magic takes care of this (just deducing the paths). Who
> would even miss this script?

Only one way to find out :) Rename it, build all packages depending on
it and fix what breaks.

> For py-cairo:

This has been fixed in the meantime with
Added graphics/py-cairo-shared version 1.25.1 [markd 2023-11-21]

 Thomas


Home | Main Index | Thread Index | Old Index