• Bug#1063567: dh-python: documentation is unclear for setting env variab

    From Drew Parsons@21:1/5 to All on Fri Feb 9 17:20:02 2024
    Package: dh-python
    Version: 6.20231223
    Severity: normal

    pybuild operations can be controlled to some extent with environment
    variables. which is often more tidy than using override_dh_auto_... in debian/rules.

    The control I want to apply is run the build only for the default python (adios2, for instance is built via cmake which only detects the default
    python version)

    It's not clear how to use pybuild's environment variables to do this.
    The pybuild man page discusses PYBUILD_DISABLE=python3.9 for excluding
    a particular python version. But this is the opposite of want I need.
    I want something like

    PYTHON3_DEFAULT = $(shell py3versions -d)
    export PYBUILD_ENABLE=$(PYTHON3_DEFAULT)

    but there's no such option.

    The man page also mentions
    PYBUILD_OPTION_VERSIONED_INTERPRETER (f.e. PYBUILD_CLEAN_ARGS_python3.2)
    but that's only for setting arguments for a specific python version,
    not for only using a specific python version.

    How should debian/rules set up the pybuild environment to only build
    for the default python version? It's not clear from the man page how to do
    this using pybuild's environment variables.



    -- System Information:
    Debian Release: trixie/sid
    APT prefers unstable-debug
    APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.6.13-amd64 (SMP w/8 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
    Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages dh-python depends on:
    ii python3 3.11.6-1
    ii python3-distutils 3.11.5-1
    ii python3-setuptools 68.1.2-2

    dh-python recommends no packages.

    Versions of packages dh-python suggests:
    ii dpkg-dev 1.22.4
    ii flit 3.9.0-2
    ii libdpkg-perl 1.22.4
    ii python3-build 1.0.3-2
    ii python3-installer 0.7.0+dfsg1-2
    ii python3-wheel 0.42.0-1

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefano Rivera@21:1/5 to All on Thu Feb 29 04:00:02 2024
    Hi Drew (2024.02.09_12:12:39_-0400)
    The control I want to apply is run the build only for the default python (adios2, for instance is built via cmake which only detects the default python version)

    Why do you need pybuild at all then? The goal of pybuild is to enable
    you to build for all supported versions.

    It's not clear how to use pybuild's environment variables to do this.
    The pybuild man page discusses PYBUILD_DISABLE=python3.9 for excluding
    a particular python version. But this is the opposite of want I need.
    I want something like

    Sounds like you want something like: --pyver $(py3versions -d)

    But again, not sure how useful pybuild is in that situation, you could
    just call cmake directly...

    Stefano

    --
    Stefano Rivera
    http://tumbleweed.org.za/
    +1 415 683 3272

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)