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

Bug#1026104: longstanding problem with dependencies of python3-numpy in testing



Hi Joachim,

On Sat, Jan 07, 2023 at 09:50:28PM +0100, Joachim Wuttke wrote:
> Would it make sense to submit an issue against dh-python?

I think that dh-python - in general - does the right thing here. It
looks at #! lines and adds the appropriate dependencies. If you want to
make a dent on python3-numpy, the way to do it would probably be
changing those #! lines.

> Sounds not too difficult ... for somebody who has full understanding
> of these scripts and all context. Which, unfortunately, is not even
> remotely the case for me.

Why would you need a full understanding? As far as I can see, the goal
is to replace #!/usr/bin/python3.11 with something that produces a
useful error message when the interpreter is missing and does not cause
dh-python to add the relevant dependency. This could be achieved with
something that looks like Python, but actually is valid in some other
language - say shell - that could be used to reexecute itself with the
desired interpreter. How about this?

    #!/bin/sh
    ":" """ "
    if which python3.11 >/dev/null 2>&1; then
        exec python3.11 "$0" "$@"
    else
        echo "Please install python3.11 to use this tool" >&2
    fi
    exit 1
    """
    print("hey, I'm running under python3.11")

Admittedly, the resulting docstring is not super useful, but this can be
the start of a compromise.

In any case, the CTTE's task is to select among available solutions and
in this case, we have a readily available solution called "status quo"
and the idea of a solution without working code. That does not make for
a great choice.

Helmut


Reply to: