[pkg-php-pear] Bug#1061575: php-codeigniter-framework: FTBFS with python 3.12

Athos Ribeiro athos.ribeiro at canonical.com
Fri Jan 26 18:10:11 GMT 2024


Source: php-codeigniter-framework
Version: 3.1.13+dfsg1-2
Severity: normal
Tags: patch
X-Debbugs-Cc: athos.ribeiro at canonical.com

Dear Maintainer,

This package FTBFS with python 3.12.

$ python setup.py install

is no longer supported.

I am attaching a fix proposal that should get the package to build for
python 3.12.
-------------- next part --------------
diff --git a/debian/control b/debian/control
index b9c279c68..8499e3f6f 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-sphinx-rtd-theme <!nodoc>,
                python3-sphinxcontrib.phpdomain <!nodoc>,
                python3-venv <!nodoc>,
+               python3-pip <!nodoc>,
 Standards-Version: 4.6.2
 Rules-Requires-Root: binary-targets
 Homepage: https://codeigniter.com/
diff --git a/debian/rules b/debian/rules
index c6c683cca..4fef1a889 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,13 +11,13 @@ override_dh_auto_test:
 
 debian/build-doc/pythonvenv/bin/python:
 	mkdir -p debian/build-doc/pythonvenv
-	python3 -m venv --system-site-packages debian/build-doc/pythonvenv
+	python3 -m venv --system-site-packages --without-pip debian/build-doc/pythonvenv
 
 pycilexer: debian/build-doc/pythonvenv/bin/python
-	if ! debian/build-doc/pythonvenv/bin/pip show pycilexer; then \
+	if ! debian/build-doc/pythonvenv/bin/python -m pip show pycilexer; then \
 	  echo "Installing pycilexer" && \
 	  cd user_guide_src/cilexer && \
-	  ../../debian/build-doc/pythonvenv/bin/python setup.py install ; \
+	  ../../debian/build-doc/pythonvenv/bin/python -m pip install .; \
 	fi
 
 ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)),)
@@ -25,12 +25,12 @@ execute_before_dh_installdocs: pycilexer
 	make -C user_guide_src clean
 
 	make -C user_guide_src html \
-	 SPHINXBUILD=../debian/build-doc/pythonvenv/bin/sphinx-build \
+	 SPHINXBUILD=/usr/bin/sphinx-build \
 	 BUILDDIR=../debian/build-doc/user_guide \
 	 SPHINXOPTS="-D version=$(DEB_VERSION_UPSTREAM) -D release=$(DEB_VERSION_UPSTREAM)"
 
 	make -C user_guide_src text \
-	  SPHINXBUILD=../debian/build-doc/pythonvenv/bin/sphinx-build \
+	  SPHINXBUILD=/usr/bin/sphinx-build \
 	  BUILDDIR=../debian/build-doc/user_guide \
 	  SPHINXOPTS="-D version=$(DEB_VERSION_UPSTREAM) -D release=$(DEB_VERSION_UPSTREAM)"
 endif


More information about the pkg-php-pear mailing list