From e8a0e3765710e0381f78d126a5bc02ee5906bc94 Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 22 Oct 2025 20:44:33 +0200 Subject: [PATCH 01/14] Add docstub annotation checks --- .github/workflows/doc_checks.yml | 6 ++++++ doc/CMakeLists.txt | 8 ++++++++ doc/requirements.txt | 1 + 3 files changed, 15 insertions(+) diff --git a/.github/workflows/doc_checks.yml b/.github/workflows/doc_checks.yml index a0685ebd5091..2046ca2580c8 100644 --- a/.github/workflows/doc_checks.yml +++ b/.github/workflows/doc_checks.yml @@ -94,6 +94,12 @@ jobs: ctest -V -R spelling --output-on-failure working-directory: build + - name: Docstub annotations + shell: bash -l {0} + run: | + ctest -V -R docstub-annotations --output-on-failure + working-directory: build + # ReadTheDocs pull requests do not build PDF, but we can break it though, # so build it here - name: PDF build diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 2562f4d66c1e..ca3892841392 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -213,4 +213,12 @@ if (BUILD_DOCS) ${CMAKE_BINARY_DIR}/swig/python/osgeo/osr.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + # Check docstub annotations + add_test(NAME docstub-annotations + COMMAND ${CMAKE_COMMAND} -E env ${BUILD_RUN_ENV} + ${Python_EXECUTABLE} -m docstub run ${CMAKE_BINARY_DIR}/swig/python/osgeo + --config ${CMAKE_BINARY_DIR}/swig/python/pyproject.toml + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + ) + endif () diff --git a/doc/requirements.txt b/doc/requirements.txt index fc710b296f4d..d1daed9212f1 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,7 @@ # This file may be used to create an environment using: # $ pip install --upgrade -r breathe +docstub fsspec numpy sphinx From e55b65f1b36d248521037cc590609dbdcd5573f3 Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 22 Oct 2025 20:53:14 +0200 Subject: [PATCH 02/14] Syntax fix --- doc/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index ca3892841392..3b9fab606bd9 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -219,6 +219,5 @@ if (BUILD_DOCS) ${Python_EXECUTABLE} -m docstub run ${CMAKE_BINARY_DIR}/swig/python/osgeo --config ${CMAKE_BINARY_DIR}/swig/python/pyproject.toml WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) - ) endif () From 515298845e13be7420bb7049c721a94aa930ab2c Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 22 Oct 2025 21:12:45 +0200 Subject: [PATCH 03/14] Annotation fixes --- swig/include/python/gdal_python.i | 4 ++-- swig/python/pyproject.toml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/swig/include/python/gdal_python.i b/swig/include/python/gdal_python.i index 49a7808c733f..b4771236007f 100644 --- a/swig/include/python/gdal_python.i +++ b/swig/include/python/gdal_python.i @@ -2406,7 +2406,7 @@ def ReleaseResultSet(self, sql_lyr): Returns ------- - datetime.datetime: + datetime Datetime value, or None if it is invalid """ @@ -2438,7 +2438,7 @@ def ReleaseResultSet(self, sql_lyr): The index of the row to read (starting at 0) iCol : int The index of the column to read (starting at 0) - dt : datetime.datetime | RATDateTime | None + dt : datetime | RATDateTime | None The datetime value """ diff --git a/swig/python/pyproject.toml b/swig/python/pyproject.toml index dcd09d668e91..ccec3a3fe074 100644 --- a/swig/python/pyproject.toml +++ b/swig/python/pyproject.toml @@ -45,7 +45,9 @@ Changelog = "https://github.com/OSGeo/gdal/blob/master/NEWS.md" Issues = "https://github.com/OSGeo/gdal/issues" [tool.docstub.types] +datetime = "datetime.datetime" CoordinateTransform = "osgeo.osr.CoordinateTransform" +CoordinateTransformation = "osgeo.osr.CoordinateTransformation" Dataset = "osgeo.gdal.Dataset" Driver = "osgeo.gdal.Driver" Feature = "osgeo.ogr.Feature" From b5a4d6c4c889dd0ce61dd384dd004f6b5a8e0ae3 Mon Sep 17 00:00:00 2001 From: sethg Date: Wed, 22 Oct 2025 21:14:13 +0200 Subject: [PATCH 04/14] Add tool.docstub.types --- swig/python/pyproject.toml.setuptools_gte_77 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/swig/python/pyproject.toml.setuptools_gte_77 b/swig/python/pyproject.toml.setuptools_gte_77 index 28c41a2bf2fa..04a8d0977087 100644 --- a/swig/python/pyproject.toml.setuptools_gte_77 +++ b/swig/python/pyproject.toml.setuptools_gte_77 @@ -42,3 +42,17 @@ Documentation = "https://gdal.org" Repository = "https://github.com/OSGeo/GDAL.git" Changelog = "https://github.com/OSGeo/gdal/blob/master/NEWS.md" Issues = "https://github.com/OSGeo/gdal/issues" + +[tool.docstub.types] +datetime = "datetime.datetime" +CoordinateTransform = "osgeo.osr.CoordinateTransform" +CoordinateTransformation = "osgeo.osr.CoordinateTransformation" +Dataset = "osgeo.gdal.Dataset" +Driver = "osgeo.gdal.Driver" +Feature = "osgeo.ogr.Feature" +FieldDomain = "osgeo.ogr.FieldDomain" +GeomFieldDefn = "osgeo.ogr.GeomFieldDefn" +Layer = "osgeo.ogr.Layer" +StyleTable = "osgeo.ogr.StyleTable" +SpatialReference = "osgeo.osr.SpatialReference" +Transformer = "osgeo.gdal.Transformer" From 59fb6d8cbbc1ffb14c9aec5f8ed7e52afce9d05f Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 24 Oct 2025 22:34:13 +0200 Subject: [PATCH 05/14] Build stub files in CI --- .github/workflows/cmake_builds.yml | 5 ++++- CMakeLists.txt | 1 + swig/python/CMakeLists.txt | 11 +++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 711f2435135f..329bb1a71dda 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -462,7 +462,7 @@ jobs: # Build PDF driver as plugin due to the PDFium build including libopenjp2 symbols which would conflict with external libopenjp2 run: | mkdir -p $GITHUB_WORKSPACE/build - cmake -G "${generator}" -Werror=dev "-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install-gdal" "-DUSE_CCACHE=ON" "-DCMAKE_PREFIX_PATH=${CONDA}/envs/gdalenv" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} -S "$GITHUB_WORKSPACE" -B "$GITHUB_WORKSPACE/build" -DGDAL_ENABLE_PLUGINS:BOOL=ON -DGDAL_ENABLE_PLUGINS_NO_DEPS:BOOL=ON -DGDAL_USE_PUBLICDECOMPWT:BOOL=ON -DPUBLICDECOMPWT_URL=https://github.com/rouault/PublicDecompWT -DBUILD_JAVA_BINDINGS=OFF -DBUILD_CSHARP_BINDINGS=ON -DGDAL_USE_MYSQL:BOOL=OFF -DCMAKE_C_FLAGS=" /WX" -DCMAKE_CXX_FLAGS=" /WX" -DWERROR_DEV_FLAG="-Werror=dev" -DCMAKE_BUILD_TYPE=Release -DPDFIUM_ROOT=$GITHUB_WORKSPACE/install-pdfium -DGDAL_ENABLE_DRIVER_PDF_PLUGIN:BOOL=ON -DCMAKE_UNITY_BUILD=ON -DOGR_ENABLE_DRIVER_TAB_PLUGIN=OFF -DOGR_ENABLE_DRIVER_GEOJSON_PLUGIN=OFF + cmake -G "${generator}" -Werror=dev "-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install-gdal" "-DUSE_CCACHE=ON" "-DCMAKE_PREFIX_PATH=${CONDA}/envs/gdalenv" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} -S "$GITHUB_WORKSPACE" -B "$GITHUB_WORKSPACE/build" -DGDAL_ENABLE_PLUGINS:BOOL=ON -DGDAL_ENABLE_PLUGINS_NO_DEPS:BOOL=ON -DGDAL_USE_PUBLICDECOMPWT:BOOL=ON -DPUBLICDECOMPWT_URL=https://github.com/rouault/PublicDecompWT -DBUILD_JAVA_BINDINGS=OFF -DBUILD_CSHARP_BINDINGS=ON -DGDAL_USE_MYSQL:BOOL=OFF -DCMAKE_C_FLAGS=" /WX" -DCMAKE_CXX_FLAGS=" /WX" -DWERROR_DEV_FLAG="-Werror=dev" -DCMAKE_BUILD_TYPE=Release -DPDFIUM_ROOT=$GITHUB_WORKSPACE/install-pdfium -DGDAL_ENABLE_DRIVER_PDF_PLUGIN:BOOL=ON -DCMAKE_UNITY_BUILD=ON -DOGR_ENABLE_DRIVER_TAB_PLUGIN=OFF -DOGR_ENABLE_DRIVER_GEOJSON_PLUGIN=OFF -DBUILD_PYTHON_STUBS=ON - name: Build shell: bash -l {0} run: cmake --build $GITHUB_WORKSPACE/build --config Release -j 2 @@ -471,6 +471,9 @@ jobs: - name: Build HTML pages shell: bash -l {0} run: cmake --build $GITHUB_WORKSPACE/build --config Release -j 2 --target html + - name: Build Python stubs + shell: bash -l {0} + run: cmake --build $GITHUB_WORKSPACE/build --config Release -j 2 --target python_stub_files - name: test shell: bash -l {0} run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index d856303b5c3c..b1d555119a58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,6 +240,7 @@ endif() if (SWIG_FOUND AND (Python_Interpreter_FOUND OR Python_FOUND)) option(BUILD_PYTHON_BINDINGS "Build Python bindings" ON) + option(BUILD_PYTHON_STUBS "Generate Python stub files for Python binding" OFF) else() option(BUILD_PYTHON_BINDINGS "Build Python bindings" OFF) endif() diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt index 9355d979ac90..db9f828e7299 100644 --- a/swig/python/CMakeLists.txt +++ b/swig/python/CMakeLists.txt @@ -377,6 +377,17 @@ if __name__ == '__main__': add_custom_target(python_binding ALL DEPENDS ${PY_SO_LIST} ${PY_SO_LIST_WITH_RPATH} ${GDAL_PYTHON_PYSOURCES} ${GDAL_LIB_TARGET_NAME}) + if (BUILD_PYTHON_STUBS) + add_custom_target( + python_stub_files + COMMAND ${Python_EXECUTABLE_CMAKE} -m docstub run + ${CMAKE_CURRENT_BINARY_DIR}/osgeo + --config ${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS ${GDAL_PYTHON_PYSOURCES} + ) + endif () + # Generate wheel if (ONLY_GENERATE_FOR_NON_DEBUG) set(BUILD_BDIST_WHEEL_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/build_bdist_wheel_$.cmake) From d9321b72d50cf07565b9b5494a2502e65ac16261 Mon Sep 17 00:00:00 2001 From: Seth G Date: Tue, 28 Oct 2025 18:05:38 +0100 Subject: [PATCH 06/14] Update swig/python/CMakeLists.txt Co-authored-by: Dan Baston --- swig/python/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt index db9f828e7299..d7d44ebb8128 100644 --- a/swig/python/CMakeLists.txt +++ b/swig/python/CMakeLists.txt @@ -380,6 +380,7 @@ if __name__ == '__main__': if (BUILD_PYTHON_STUBS) add_custom_target( python_stub_files + ALL COMMAND ${Python_EXECUTABLE_CMAKE} -m docstub run ${CMAKE_CURRENT_BINARY_DIR}/osgeo --config ${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml From 07133f646d342fe6730b3b60cc0c407f247bc170 Mon Sep 17 00:00:00 2001 From: sethg Date: Thu, 30 Oct 2025 16:06:10 +0100 Subject: [PATCH 07/14] Build Python stubs on Ubuntu image --- .github/workflows/cmake_builds.yml | 2 +- .github/workflows/ubuntu_24.04/build.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 329bb1a71dda..06373a0b4ab8 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -462,7 +462,7 @@ jobs: # Build PDF driver as plugin due to the PDFium build including libopenjp2 symbols which would conflict with external libopenjp2 run: | mkdir -p $GITHUB_WORKSPACE/build - cmake -G "${generator}" -Werror=dev "-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install-gdal" "-DUSE_CCACHE=ON" "-DCMAKE_PREFIX_PATH=${CONDA}/envs/gdalenv" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} -S "$GITHUB_WORKSPACE" -B "$GITHUB_WORKSPACE/build" -DGDAL_ENABLE_PLUGINS:BOOL=ON -DGDAL_ENABLE_PLUGINS_NO_DEPS:BOOL=ON -DGDAL_USE_PUBLICDECOMPWT:BOOL=ON -DPUBLICDECOMPWT_URL=https://github.com/rouault/PublicDecompWT -DBUILD_JAVA_BINDINGS=OFF -DBUILD_CSHARP_BINDINGS=ON -DGDAL_USE_MYSQL:BOOL=OFF -DCMAKE_C_FLAGS=" /WX" -DCMAKE_CXX_FLAGS=" /WX" -DWERROR_DEV_FLAG="-Werror=dev" -DCMAKE_BUILD_TYPE=Release -DPDFIUM_ROOT=$GITHUB_WORKSPACE/install-pdfium -DGDAL_ENABLE_DRIVER_PDF_PLUGIN:BOOL=ON -DCMAKE_UNITY_BUILD=ON -DOGR_ENABLE_DRIVER_TAB_PLUGIN=OFF -DOGR_ENABLE_DRIVER_GEOJSON_PLUGIN=OFF -DBUILD_PYTHON_STUBS=ON + cmake -G "${generator}" -Werror=dev "-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install-gdal" "-DUSE_CCACHE=ON" "-DCMAKE_PREFIX_PATH=${CONDA}/envs/gdalenv" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} -S "$GITHUB_WORKSPACE" -B "$GITHUB_WORKSPACE/build" -DGDAL_ENABLE_PLUGINS:BOOL=ON -DGDAL_ENABLE_PLUGINS_NO_DEPS:BOOL=ON -DGDAL_USE_PUBLICDECOMPWT:BOOL=ON -DPUBLICDECOMPWT_URL=https://github.com/rouault/PublicDecompWT -DBUILD_JAVA_BINDINGS=OFF -DBUILD_CSHARP_BINDINGS=ON -DGDAL_USE_MYSQL:BOOL=OFF -DCMAKE_C_FLAGS=" /WX" -DCMAKE_CXX_FLAGS=" /WX" -DWERROR_DEV_FLAG="-Werror=dev" -DCMAKE_BUILD_TYPE=Release -DPDFIUM_ROOT=$GITHUB_WORKSPACE/install-pdfium -DGDAL_ENABLE_DRIVER_PDF_PLUGIN:BOOL=ON -DCMAKE_UNITY_BUILD=ON -DOGR_ENABLE_DRIVER_TAB_PLUGIN=OFF -DOGR_ENABLE_DRIVER_GEOJSON_PLUGIN=OFF - name: Build shell: bash -l {0} run: cmake --build $GITHUB_WORKSPACE/build --config Release -j 2 diff --git a/.github/workflows/ubuntu_24.04/build.sh b/.github/workflows/ubuntu_24.04/build.sh index 8af7c7451d2a..fbf3d318444f 100755 --- a/.github/workflows/ubuntu_24.04/build.sh +++ b/.github/workflows/ubuntu_24.04/build.sh @@ -17,7 +17,8 @@ cmake ${GDAL_SOURCE_DIR:=..} \ "-DUSE_PRECOMPILED_HEADERS=ON" \ -DOracle_ROOT=/opt/instantclient_19_9 \ -DGDAL_USE_GEOTIFF_INTERNAL:BOOL=ON \ - -DGDAL_USE_TIFF_INTERNAL:BOOL=ON + -DGDAL_USE_TIFF_INTERNAL:BOOL=ON \ + -DBUILD_PYTHON_STUBS:BOOL=ON echo "Test turning GDAL drivers off" cp CMakeCache.txt CMakeCache.txt.bak From d8c59b7245e05ef960a97ae944288afe4d927c5b Mon Sep 17 00:00:00 2001 From: sethg Date: Thu, 30 Oct 2025 16:41:18 +0100 Subject: [PATCH 08/14] Test docstubs on cmake build --- .github/workflows/cmake_builds.yml | 2 +- .github/workflows/ubuntu_24.04/build.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 06373a0b4ab8..057d132787fe 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-22.04 env: BUILD_NAME: cmake-ubuntu-jammy - CMAKE_OPTIONS: -DPython_LOOKUP_VERSION=3.10 -DUSE_CCACHE=ON -DSWIG_REGENERATE_PYTHON=ON + CMAKE_OPTIONS: -DPython_LOOKUP_VERSION=3.10 -DUSE_CCACHE=ON -DSWIG_REGENERATE_PYTHON=ON -DBUILD_PYTHON_STUBS=ON cache-name: cmake-ubuntu-jammy steps: - name: Checkout GDAL diff --git a/.github/workflows/ubuntu_24.04/build.sh b/.github/workflows/ubuntu_24.04/build.sh index fbf3d318444f..8af7c7451d2a 100755 --- a/.github/workflows/ubuntu_24.04/build.sh +++ b/.github/workflows/ubuntu_24.04/build.sh @@ -17,8 +17,7 @@ cmake ${GDAL_SOURCE_DIR:=..} \ "-DUSE_PRECOMPILED_HEADERS=ON" \ -DOracle_ROOT=/opt/instantclient_19_9 \ -DGDAL_USE_GEOTIFF_INTERNAL:BOOL=ON \ - -DGDAL_USE_TIFF_INTERNAL:BOOL=ON \ - -DBUILD_PYTHON_STUBS:BOOL=ON + -DGDAL_USE_TIFF_INTERNAL:BOOL=ON echo "Test turning GDAL drivers off" cp CMakeCache.txt CMakeCache.txt.bak From 50b4f0bca34ef5be18fafc3e060aeef31b8d624d Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 31 Oct 2025 10:19:39 +0100 Subject: [PATCH 09/14] remove target --- .github/workflows/cmake_builds.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 057d132787fe..1fba4dd1c558 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -471,9 +471,6 @@ jobs: - name: Build HTML pages shell: bash -l {0} run: cmake --build $GITHUB_WORKSPACE/build --config Release -j 2 --target html - - name: Build Python stubs - shell: bash -l {0} - run: cmake --build $GITHUB_WORKSPACE/build --config Release -j 2 --target python_stub_files - name: test shell: bash -l {0} run: | From cef2e22ee97285efea00b70595239f75e0fb9e5a Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 31 Oct 2025 11:13:57 +0100 Subject: [PATCH 10/14] Install docstub --- .github/workflows/cmake_builds.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 1fba4dd1c558..61dd836aa06d 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -97,6 +97,7 @@ jobs: sudo apt-get install -y -V libarrow-dev libparquet-dev libarrow-dataset-dev libarrow-compute-dev # PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -r $GITHUB_WORKSPACE/autotest/requirements.txt + PYTHON_CMD=python3 && $PYTHON_CMD -m pip install docstub - name: Build libjxl run: | From 88eac1220d5b55ad1af6df1e6d69aa687f79faef Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 31 Oct 2025 11:42:57 +0100 Subject: [PATCH 11/14] Pin docstub version --- .github/workflows/cmake_builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 61dd836aa06d..77ac1f682281 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -96,8 +96,8 @@ jobs: sudo apt-get update sudo apt-get install -y -V libarrow-dev libparquet-dev libarrow-dataset-dev libarrow-compute-dev # + PYTHON_CMD=python3 && $PYTHON_CMD -m pip install docstub==0.5.0 PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -r $GITHUB_WORKSPACE/autotest/requirements.txt - PYTHON_CMD=python3 && $PYTHON_CMD -m pip install docstub - name: Build libjxl run: | From c62062590713ac66ca21963fd6c24f2bff70e85e Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 31 Oct 2025 12:58:26 +0100 Subject: [PATCH 12/14] Add --break-system-packages --- .github/workflows/cmake_builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 77ac1f682281..90f20f5a6d4d 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -96,7 +96,7 @@ jobs: sudo apt-get update sudo apt-get install -y -V libarrow-dev libparquet-dev libarrow-dataset-dev libarrow-compute-dev # - PYTHON_CMD=python3 && $PYTHON_CMD -m pip install docstub==0.5.0 + PYTHON_CMD=python3 && $PYTHON_CMD -m pip install docstub==0.5.0 --break-system-packages PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -r $GITHUB_WORKSPACE/autotest/requirements.txt - name: Build libjxl From f3c63b12560ed99847e07ad3091456836226dba0 Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 31 Oct 2025 14:43:55 +0100 Subject: [PATCH 13/14] Rollback CI attempts --- .github/workflows/cmake_builds.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cmake_builds.yml b/.github/workflows/cmake_builds.yml index 90f20f5a6d4d..711f2435135f 100644 --- a/.github/workflows/cmake_builds.yml +++ b/.github/workflows/cmake_builds.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-22.04 env: BUILD_NAME: cmake-ubuntu-jammy - CMAKE_OPTIONS: -DPython_LOOKUP_VERSION=3.10 -DUSE_CCACHE=ON -DSWIG_REGENERATE_PYTHON=ON -DBUILD_PYTHON_STUBS=ON + CMAKE_OPTIONS: -DPython_LOOKUP_VERSION=3.10 -DUSE_CCACHE=ON -DSWIG_REGENERATE_PYTHON=ON cache-name: cmake-ubuntu-jammy steps: - name: Checkout GDAL @@ -96,7 +96,6 @@ jobs: sudo apt-get update sudo apt-get install -y -V libarrow-dev libparquet-dev libarrow-dataset-dev libarrow-compute-dev # - PYTHON_CMD=python3 && $PYTHON_CMD -m pip install docstub==0.5.0 --break-system-packages PYTHON_CMD=python3 && $PYTHON_CMD -m pip install -r $GITHUB_WORKSPACE/autotest/requirements.txt - name: Build libjxl From 9d6f3beb3c5c0df273d42d7c69166339e0c427b6 Mon Sep 17 00:00:00 2001 From: sethg Date: Fri, 31 Oct 2025 19:50:47 +0100 Subject: [PATCH 14/14] Install docstub for doc_checks.yml --- .github/workflows/doc_checks.yml | 1 + doc/requirements.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc_checks.yml b/.github/workflows/doc_checks.yml index 2046ca2580c8..6d2be8d9cc25 100644 --- a/.github/workflows/doc_checks.yml +++ b/.github/workflows/doc_checks.yml @@ -37,6 +37,7 @@ jobs: python3 -m pip install -r doc/requirements.txt python3 -m pip install setuptools python3 -m pip install pytest + python3 -m pip install docstub echo PATH=$PATH >> $GITHUB_ENV - name: Build GDAL diff --git a/doc/requirements.txt b/doc/requirements.txt index d1daed9212f1..fc710b296f4d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,6 @@ # This file may be used to create an environment using: # $ pip install --upgrade -r breathe -docstub fsspec numpy sphinx