Package: python3-libfdt
Version: 1.6.1-2+b1
Severity: important
X-Debbugs-Cc: deb...@microjoe.org

Control: -1 blocks 1012369

Dear Maintainer,

The python3-libfdt package is currently only built against the
python3-dev Build-Dependency:

```
$ ls /usr/lib/python3/dist-packages/_libfdt*
/usr/lib/python3/dist-packages/_libfdt.cpython-310-x86_64-linux-gnu.so
```

This means that python3-libfdt is currently:

- Available for python3.10
- Not available for python3.9

Most of the time we have two concurrent Python versions in Debian to
allow for smooth upgrades. This is why this package is no exception and
needs to be built for every supported Python version in Debian.

I have tried to provide a patch using `py3versions -s` and replacing
`python3-dev` with `python3-all-dev` without success. It seems that I am
not able to pass multiple Python versions to the Makefile.

The patch is attached as a starting point, but I will not mark the bug
with the patch attribute since this patch is not working and needs
refinement.

I think folks on #debian-python on OFTC will be happy to help if you
encounter the same struggle as I did and need to reach out.

Thanks in advance.

Agathe


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

Kernel: Linux 5.18.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-libfdt depends on:
ii  libc6    2.33-8
ii  python3  3.10.4-1+b1

python3-libfdt recommends no packages.

python3-libfdt suggests no packages.

-- no debconf information
diff --git a/debian/control b/debian/control
index 1d10fd8..c69f8b8 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 13),
  bison,
  libyaml-dev,
  pkg-config,
- python3-dev,
+ python3-all-dev,
  python3-setuptools,
  python3-setuptools-scm,
  swig,
diff --git a/debian/rules b/debian/rules
index 8a32ccf..2be35f2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,8 @@
 # respect SOURCE_DATE_EPOCH.
 export FORCE_SOURCE_DATE=1

+export DH_VERBOSE=1
+
 export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all

@@ -28,10 +30,14 @@ endif

 override_dh_auto_install:
        NO_PYTHON=1 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr 
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
-       $(MAKE) maybe_install_pylibfdt EXTRA_CFLAGS="$(EXTRA_CFLAGS)" 
PREFIX=$(CURDIR)/debian/tmp/usr
+       set -e; for py in $(shell py3versions -s) ; do \
+               $(MAKE) maybe_install_pylibfdt EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+               PREFIX=$(CURDIR)/debian/tmp/usr \
+               PYTHON=$$py ; \
+       done

 override_dh_auto_clean:
        dh_auto_clean
        [ ! -f Documentation/Makefile ] || $(MAKE) -C Documentation clean
        [ ! -d build ] || rm -rf build
-       [ ! -d pylibfdt/libfdt.egg-info/] || rm -rf pylibfdt/libfdt.egg-info/
+       [ ! -d pylibfdt/libfdt.egg-info/ ] || rm -rf pylibfdt/libfdt.egg-info/

Reply via email to