Skip to content

configure behavior about python is hard for packaging #1787

@gdt

Description

@gdt

I am using nut git master as of today, building in pkgsrc.

(From my viewpoint python 2.7 is now history and we might as well gc the support. But that's off point.)

pkgsrc chooses a python version to depend on and ensures it is there, and sets variables in our Makefile that I can pass in the env or to configure, in order to use that version (and only that version). So I don't want nut's configure to look, I want to pass the specific version.

It's unsound to use env or python3 because we are installing in some particular versions site-packages, so we can't have that just change. It has to match.

I am already passing -I/-L CFLAGS/LDFLAGS for python3.10 but I think that's not important.

The python configure code appears not to take a version as input, and it looks for python3 before python3.N. It doesn't look for 3.10. It finds it without a pass, and testclient ends up with "#!/usr/bin/env python3", and this is not allowed (not bound to the dependency precisely). I want "#!/usr/pkg/bin/python3.10" after I pass in --with-python=/usr/pkg/bin/python3.10 or PYTHON= (whatever works is fine in env or configure cmd line).

My suggestions (severable :-) are:

  • rip out python2 stuff
  • take a --with-python=/path/to/python3.N arg
  • if not, for python3, look for python3.10 through python3.7 or maybe lower by default. Skip python3 as dangerous and people who want that can use --with-python.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions