Skip to content

wrong python installation when system has multiple versions #1792

@gdt

Description

@gdt

I am building recent master under pkgsrc.
The build passes --with-python=/usr/pkg/bin/python3.10. On a system with only 3.10, PyNUT.py and test_nutclient.py are installed correctly with the right #! path.

On a system with all of python2.7 python3.9 and python3.10 installed, I get 3 copies of the python files in site-packages for all 3 python versions. I think this is a bug because I specified the python version to configure, and once specified, others should not be found and used. (It also doesn't play well with packaging; nobody would want a package that depends on 3 python versions!)

Additionally, the #! for the 2.7 and 3.9 versions is: #!/usr/pkg/bin/python3.10.

I think the fix is to find and use a single python version. I am not aware of packages that find multiple and install to multiple; the usual approach if python modules are needed in multiple is to install multiple versioned packages, e.g. py39-ups-nut and py310-ups-nut. Each package invokes the build once and thus each build uses one version.

Perhaps this is resolved by #1788?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions