Hello, the following (attached) patch might do the trick and be safe for 
Python3 transitions:

diff -Nru python-samplerate-0.2.4/debian/changelog 
python-samplerate-0.2.4/debian/changelog
--- python-samplerate-0.2.4/debian/changelog 2026-04-07 15:19:58.000000000 +0200
+++ python-samplerate-0.2.4/debian/changelog 2026-07-31 21:20:24.000000000 +0200
@@ -1,3 +1,9 @@
+python-samplerate (0.2.4-2.1) unstable; urgency=medium
+
+ * Proper versioning and run only for default Python3 (Closes: #-1)
+
+ -- Gianfranco Costamagna <[email protected]> Fri, 31 Jul 2026 21:20:24 
+0200
+
python-samplerate (0.2.4-2) unstable; urgency=medium

* added the mark Multi-Arch: foreign to the package python-samplerate-doc
diff -Nru python-samplerate-0.2.4/debian/rules 
python-samplerate-0.2.4/debian/rules
--- python-samplerate-0.2.4/debian/rules 2026-03-23 15:30:55.000000000 +0100
+++ python-samplerate-0.2.4/debian/rules 2026-07-31 21:20:24.000000000 +0200
@@ -15,7 +15,8 @@
%:
dh $@ --buildsystem=pybuild --with sphinxdoc

-PYTHON313PATH=.pybuild/cpython3_3.13_samplerate/build
+PY3DEFAULTVER=$(shell py3versions -d -v)
+PYTHON3PATH=.pybuild/cpython3_$(PY3DEFAULTVER)_samplerate/build

# If you need to rebuild the Sphinx documentation:
# Add sphinxdoc to the dh --with line.
@@ -23,7 +24,7 @@
execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep:
- PYTHONPATH=$(PYTHON313PATH) \
+ PYTHONPATH=$(PYTHON3PATH) \
python3 -m sphinx -N -bhtml \
docs/ build/html # HTML generator
: # remove privacy-breach stuff related to https://ghbtns.com/
@@ -37,12 +38,12 @@
-e 
's%src="https://img.shields.io/pypi/v/samplerate.svg"%src="doc-images/version_0.2.svg"%'
 \
-e 
's%src="https://img.shields.io/pypi/wheel/samplerate.svg"%src="doc-images/wheel_
 yes.svg"%' \
build/html/index.html
- PYTHONPATH=$(PYTHON313PATH) \
+ PYTHONPATH=$(PYTHON3PATH) \
python3 -m sphinx -N -bman \
docs/ build/man # Manpage generator

override_dh_auto_test:
- PYTHONPATH=$(PYTHON313PATH) pytest
+ PYTHONPATH=$(PYTHON3PATH) pytest

override_dh_auto_clean:
rm -f src/samplerate.egg-info/SOURCES.txt

thanks for considering it

G.
diff -Nru python-samplerate-0.2.4/debian/changelog python-samplerate-0.2.4/debian/changelog
--- python-samplerate-0.2.4/debian/changelog	2026-04-07 15:19:58.000000000 +0200
+++ python-samplerate-0.2.4/debian/changelog	2026-07-31 21:20:24.000000000 +0200
@@ -1,3 +1,9 @@
+python-samplerate (0.2.4-2ubuntu2) stonking; urgency=medium
+
+  * Proper versioning and run only for default Python3
+
+ -- Gianfranco Costamagna <[email protected]>  Fri, 31 Jul 2026 21:20:24 +0200
+
 python-samplerate (0.2.4-2) unstable; urgency=medium
 
   * added the mark Multi-Arch: foreign to the package python-samplerate-doc
diff -Nru python-samplerate-0.2.4/debian/rules python-samplerate-0.2.4/debian/rules
--- python-samplerate-0.2.4/debian/rules	2026-03-23 15:30:55.000000000 +0100
+++ python-samplerate-0.2.4/debian/rules	2026-07-31 21:20:24.000000000 +0200
@@ -15,7 +15,8 @@
 %:
 	dh $@ --buildsystem=pybuild --with sphinxdoc
 
-PYTHON313PATH=.pybuild/cpython3_3.13_samplerate/build
+PY3DEFAULTVER=$(shell py3versions -d -v)
+PYTHON3PATH=.pybuild/cpython3_$(PY3DEFAULTVER)_samplerate/build
 
 # If you need to rebuild the Sphinx documentation:
 # Add sphinxdoc to the dh --with line.
@@ -23,7 +24,7 @@
 execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
 execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
 execute_after_dh_auto_build-indep:
-	PYTHONPATH=$(PYTHON313PATH) \
+	PYTHONPATH=$(PYTHON3PATH) \
 	python3 -m sphinx -N -bhtml \
 	docs/ build/html # HTML generator
 	: # remove privacy-breach stuff related to https://ghbtns.com/
@@ -37,12 +38,12 @@
 	  -e 's%src="https://img.shields.io/pypi/v/samplerate.svg"%src="doc-images/version_0.2.svg"%' \
 	  -e 's%src="https://img.shields.io/pypi/wheel/samplerate.svg"%src="doc-images/wheel_ yes.svg"%' \
 	  build/html/index.html
-	PYTHONPATH=$(PYTHON313PATH) \
+	PYTHONPATH=$(PYTHON3PATH) \
 	python3 -m sphinx -N -bman \
 	docs/ build/man # Manpage generator
 
 override_dh_auto_test:
-	PYTHONPATH=$(PYTHON313PATH) pytest
+	PYTHONPATH=$(PYTHON3PATH) pytest
 
 override_dh_auto_clean:
 	rm -f src/samplerate.egg-info/SOURCES.txt

Reply via email to