Bas Couwenberg pushed to branch experimental at Debian GIS Project / gdal


Commits:
73a80c80 by Bas Couwenberg at 2023-11-24T16:34:59+01:00
Add upstream patch to fix installation of Python bindings with python3.12. 
(closes: #1055682)

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/pr8812-python3.12.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gdal (3.8.1~rc2+dfsg-1~exp2) UNRELEASED; urgency=medium
+
+  * Add upstream patch to fix installation of Python bindings with python3.12.
+    (closes: #1055682)
+
+ -- Bas Couwenberg <[email protected]>  Fri, 24 Nov 2023 16:34:29 +0100
+
 gdal (3.8.1~rc2+dfsg-1~exp1) experimental; urgency=medium
 
   * New upstream release candidate.


=====================================
debian/patches/pr8812-python3.12.patch
=====================================
@@ -0,0 +1,38 @@
+Description: Fix installation of Python bindings with python3.12.
+Author: Even Rouault <[email protected]>
+Origin: https://github.com/OSGeo/gdal/pull/8812
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055682
+Forwarded: not-needed
+
+--- a/swig/python/install_python.cmake.in
++++ b/swig/python/install_python.cmake.in
+@@ -19,8 +19,11 @@ if(NOT "@SETUPTOOLS_USE_DISTUTILS@x" STR
+ endif()
+ if(DEFINED INSTALL_PREFIX)
+    execute_process(COMMAND "@Python_EXECUTABLE_CMAKE@" "@SETUP_PY_FILENAME@" 
install ${ROOT_DIR_ARG} @INSTALL_ARGS@ "${INSTALL_PREFIX}"
+-                   WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@")
++                   WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@" 
RESULT_VARIABLE res)
+ else()
+    execute_process(COMMAND "@Python_EXECUTABLE_CMAKE@" "@SETUP_PY_FILENAME@" 
install ${ROOT_DIR_ARG} @INSTALL_ARGS@
+-                   WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@")
++                   WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@" 
RESULT_VARIABLE res)
++endif()
++if(NOT res EQUAL 0)
++   message( FATAL_ERROR "Installation of python bindings failed")
+ endif()
+--- a/swig/python/CMakeLists.txt
++++ b/swig/python/CMakeLists.txt
+@@ -403,7 +403,12 @@ if (Python_Interpreter_FOUND)
+     set(SETUPTOOLS_USE_DISTUTILS stdlib)
+   elseif ("${SITE_PACKAGE_DIR}" MATCHES "dist-packages")
+     set(INSTALL_ARGS "${INSTALL_ARGS} --install-layout=deb")
+-    set(SETUPTOOLS_USE_DISTUTILS stdlib)
++    if(Python_VERSION VERSION_LESS 3.12)
++        # It no longer seems needed to mess with SETUPTOOLS_USE_DISTUTILS
++        # with Debian Python 3.12 (or maybe its setuptools 68.1.2 version...),
++        # so only do that with older versions
++        set(SETUPTOOLS_USE_DISTUTILS stdlib)
++    endif()
+   endif ()
+ 
+   if (ONLY_GENERATE_FOR_NON_DEBUG)


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 repack.patch
+pr8812-python3.12.patch



View it on GitLab: 
https://salsa.debian.org/debian-gis-team/gdal/-/commit/73a80c80031005fd53a822911b8bae0963b2539a

-- 
View it on GitLab: 
https://salsa.debian.org/debian-gis-team/gdal/-/commit/73a80c80031005fd53a822911b8bae0963b2539a
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
Pkg-grass-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to