[neon/backports-noble/fwupd-noble/Neon/release] debian: change tact and use a shim to override

Carlos De Maine null at kde.org
Wed Sep 16 00:51:45 BST 2026


Git commit fc2777118a6335fdf3899b96769163ba7db4ca9c by Carlos De Maine.
Committed on 15/09/2026 at 23:51.
Pushed by carlosdem into branch 'Neon/release'.

change tact and use a shim to override

deprecated distutils.msvccompiler call in gobject-introspection

M  +1    -11   debian/rules
A  +2    -0    debian/shims/distutils/__init__.py

https://invent.kde.org/neon/backports-noble/fwupd-noble/-/commit/fc2777118a6335fdf3899b96769163ba7db4ca9c

diff --git a/debian/rules b/debian/rules
index ecf038d..302b2e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,11 +10,7 @@ ifeq ($(DEB_HOST_ARCH_BITS),32)
 	export DEB_CFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 endif
 
-include /usr/share/dpkg/default.mk
-
-$(shell mkdir -p $(CURDIR)/debian/tmp-python/distutils && echo "class MSVCCompiler: pass" > $(CURDIR)/debian/tmp-python/distutils/msvccompiler.py)
-
-export PYTHONPATH := $(CURDIR)/debian/tmp-python:$(PYTHONPATH)
+export PYTHONPATH := $(CURDIR)/debian/shims:$(PYTHONPATH)
 
 CONFARGS =
 
@@ -54,12 +50,6 @@ override_dh_auto_clean:
 	rm -fr obj-*
 	rm -fr debian/build
 
-execute_before_dh_auto_configure:
-	@PYVER=$$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"); \
-	PREFIX_DIR="$$(python3 -c 'import site; print(site.getsitepackages()[0])' 2>/main || echo /usr/lib/python3.$$PYVER/dist-packages)"; \
-	mkdir -p $$PREFIX_DIR/distutils; \
-	echo "class MSVCCompiler: pass" > $$PREFIX_DIR/distutils/msvccompiler.py
-
 override_dh_auto_configure:
 	dh_auto_configure -- $(CONFARGS)
 
diff --git a/debian/shims/distutils/__init__.py b/debian/shims/distutils/__init__.py
new file mode 100644
index 0000000..4a32d60
--- /dev/null
+++ b/debian/shims/distutils/__init__.py
@@ -0,0 +1,2 @@
+class MSVCCompiler:
+    pass


More information about the Neon-commits mailing list