#1033421 newt: nopython not full respected

Package:
newt
Source:
newt
Submitter:
henrynmail-debian@yahoo.com
Date:
2023-03-25 14:57:03 UTC
Severity:
normal
Tags:
#1033421#5
Date:
2023-03-24 19:08:36 UTC
From:
To:
Dear Maintainer,

the build option "nopython" was not respected in all cases.
In rules exist a check for nopython in DEB_BUILD_PROFILES, but later in
Makefile.in it will overritten by setting PYTHONVERS again.
If libpython*-dev is not installed, the build breaks with

        Python.h: No such file or directory

The fail was detected by cross builing, but also exist in native builds.

# apt remove python3-all libpython3.11-dev libpython3.11-dbg python3-minimal
# dpkg-buildpackage -B "-Pnocheck noinsttest noudeb nopython" -uc -us
...
/bin/sh: 1: python3.11-config: not found
/bin/sh: 1: python3.11-config: not found
/bin/sh: 1: python3.11-config: not found
/bin/sh: 1: python3.11-config: not found
gcc -fPIC -D_GNU_SOURCE -Wdate-time -D_FORTIFY_SOURCE=2
-I/usr/include/tcl8.6 -g -O2 -ffile-prefix-map=/tmp/newt/newt-0.52.23=.
-fstack-protector-strong -Wformat -Werror=format-security
-DMARCH="x86_64-linux-gnu" -fPIC -c -o python3.11/snack.o snack.c
snack.c:2:10: fatal error: Python.h: No such file or directory
    2 | #include "Python.h"
      |          ^~~~~~~~~~
compilation terminated.

#1033421#10
Date:
2023-03-25 11:12:50 UTC
From:
To:
Failing to cross build is not release critical, updating the severity
accordingly.

Hi,

* henrynmail-debian@yahoo.com <henrynmail-debian@yahoo.com> [2023-03-24 19:08]:

This is actually interesting as the build continues despite the error
(which maybe RC itself). An easy way to reproduce is:

sbuild --no-arch-all --profiles=nocheck,noinsttest,noudeb,nopython -d unstable newt --host=arm64 --build amd64

Cheers Jochen

#1033421#17
Date:
2023-03-25 14:55:20 UTC
From:
To:
Opened as new bug #1033465 with patch included.