From 45425312f315f0f17d6e90c929eb433f569352a6 Mon Sep 17 00:00:00 2001 From: Guytri KASTANE Date: Wed, 13 Mar 2024 15:35:06 +0100 Subject: [PATCH] gdal patch based on python version and sphinxintl archive prefix --- products/gdal.pyconf | 6 ------ products/patches/gdal.0003-ignore_use2to3.patch | 11 +++++------ products/sphinxintl.pyconf | 1 + 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/products/gdal.pyconf b/products/gdal.pyconf index 644c398..82c6771 100644 --- a/products/gdal.pyconf +++ b/products/gdal.pyconf @@ -63,12 +63,6 @@ version_2_4_0_CO8: ] } -version_2_4_0_CO7: -{ - compil_script : 'gdal-2.4.0.sh' - patches : ["gdal.0003-ignore_use2to3.patch"] -} - version_2_4_0_DB10: { compil_script : 'gdal-2.4.0.sh' diff --git a/products/patches/gdal.0003-ignore_use2to3.patch b/products/patches/gdal.0003-ignore_use2to3.patch index 170c651..6d8cb74 100644 --- a/products/patches/gdal.0003-ignore_use2to3.patch +++ b/products/patches/gdal.0003-ignore_use2to3.patch @@ -1,6 +1,7 @@ ---- gdal-2.4.0-ref/gdal/swig/python/setup.py 2024-02-29 16:16:44.971469916 +0100 -+++ gdal-2.4.0-dev/gdal/swig/python/setup.py 2024-02-29 16:18:30.827527655 +0100 -@@ -128,11 +128,12 @@ +diff -Naur gdal/gdal/swig/python/setup.py gdal_dev/gdal/swig/python/setup.py +--- gdal/gdal/swig/python/setup.py 2022-01-10 20:49:08.000000000 +0000 ++++ gdal_dev/gdal/swig/python/setup.py 2024-03-13 08:29:24.760605976 +0000 +@@ -128,11 +128,10 @@ all_fixers = set(get_fixers_from_package('lib2to3.fixes')) exclude_fixers = sorted(all_fixers.difference(fixer_names)) @@ -9,12 +10,10 @@ - extra['use_2to3_fixers'] = [] - extra['use_2to3_exclude_fixers'] = exclude_fixers - -+ try: ++ if sys.version_info < (3, 9): + extra['use_2to3'] = True + extra['use_2to3_fixers'] = [] + extra['use_2to3_exclude_fixers'] = exclude_fixers -+ except: -+ print("WARNING: could not set extra dictionary keys values: use_2to3!") class gdal_config_error(Exception): pass diff --git a/products/sphinxintl.pyconf b/products/sphinxintl.pyconf index 81e90b3..ec7696f 100644 --- a/products/sphinxintl.pyconf +++ b/products/sphinxintl.pyconf @@ -4,6 +4,7 @@ default : build_source : "script" compil_script : 'pip_install' + $VARS.scriptExtension get_source : "archive" + archive_info : {archive_prefix: 'sphinx_intl'} system_info : { rpm : ["python3-sphinx-intl"] -- 2.39.2