Package: dh-python
Version: 7.20251227
Severity: important

pybuild in dh-python 7 appears to have introduced a regression,
seen in the fenics-dolfinx build at
https://buildd.debian.org/status/fetch.php?pkg=fenics-dolfinx&arch=amd64&ver=1%3A0.10.0.post5-3&stamp=1766966439&raw=0

Running the pybuild step manually with --verbose, I get extra information:

$ PETSC_DIR=/usr/lib/petsc SLEPC_DIR=/usr/lib/slepc VERBOSE=1 
ADIOS2_ALWAYS_USE_MPI=1 PUSIMP_EXPECT_DOLFINX_IN_CWD=1 pybuild --dir=./python 
--dest-dir=./debian/tmp-real --system=pyproject --name=dolfinx-real 
--test-pytest --verbose
D: pybuild pybuild:578: version: 7.20251227
D: pybuild pybuild:579: ['/usr/bin/pybuild', '--dir=./python', 
'--dest-dir=./debian/tmp-real', '--system=pyproject', '--name=dolfinx-real', 
'--test-pytest', '--verbose']
D: pybuild pybuild:54: cfg: PybuildOptions(verbose=True, quiet=False, 
really_quiet=False, detect_only=False, clean_only=False, configure_only=False, 
build_only=False, install_only=False, test_only=False, autopkgtest_only=False, 
list_systems=False, print_args=[], before_clean=None, clean_args=None, 
after_clean=None, before_configure=None, configure_args=None, 
after_configure=None, before_build=None, build_args=None, after_build=None, 
before_install=None, install_args=None, after_install=None, before_test=None, 
test_args=None, after_test=None, test_nose=False, test_nose2=False, 
test_pytest=True, test_tox=False, test_stestr=False, test_unittest=False, 
test_custom=False, dir='./python', destdir='./debian/tmp-real', 
ext_destdir=None, ext_pattern='\\.so(\\.[^/]*)?$', ext_sub_pattern=None, 
ext_sub_repl=None, install_dir='/usr/lib/python{version}/dist-packages', 
name='dolfinx-real', system='pyproject', versions=[], 
interpreter=['python{version}'], disable=None, custom_tests=True)
D: pybuild tools:296: invoking: /usr/bin/dpkg-architecture
D: pybuild pybuild:174: detected build system: pyproject (certainty: 99%)
D: pybuild pybuild:198: defaulting to all supported Python 3.X versions
E: pybuild pybuild:537: plugin pyproject failed: cannot access local variable 
'c' where it is not associated with a value
Traceback (most recent call last):
  File "/usr/bin/pybuild", line 521, in main
    c.dir = get_option("dir", i, version, cfg.dir)
    ^
UnboundLocalError: cannot access local variable 'c' where it is not associated 
with a value


So the problem is happening at line 521 in pybuild, setting c.dir but
c is evidently not defined.

l.520 has
    context.copy()
which we can compare with an earlier l.477
    c = context.copy()
(I gather the value set for func at l.477 is not carried forward to l.521)

Should l.520 be patched to set `c =` ?

I marked the bug severity: important but an argument could be made for
serious since it's causing FTBFS.


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

Kernel: Linux 6.17.12+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, 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.13.9-2

dh-python recommends no packages.

Versions of packages dh-python suggests:
ii  dpkg-dev           1.23.3
ii  flit               3.12.0-3
ii  libdpkg-perl       1.23.3
ii  python3-build      1.2.2-4
ii  python3-installer  0.7.0+dfsg1-3
ii  python3-wheel      0.46.1-2

-- no debconf information

Reply via email to