Skip to content

Commit 19671ee

Browse files
committed
Python bindings: fix compatibility issue with SWIG 4.3.1 and PYTHONWARNINGS=error
Fixes conda-forge/gdal-feedstock#995
1 parent b99ab1e commit 19671ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

swig/python/modify_cpp_files.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ string(REPLACE "if (--interpreter_counter != 0) // another sub-interpreter may s
6262
_CONTENTS "${_CONTENTS}")
6363

6464
# Works around https://github.com/swig/swig/issues/3061
65+
# For SWIG 4.3.0:
6566
string(REPLACE "# define SWIG_HEAPTYPES" "// Below is disabled because of https://github.com/swig/swig/issues/3061\n// # define SWIG_HEAPTYPES"
6667
_CONTENTS "${_CONTENTS}")
68+
# For SWIG 4.3.1:
69+
string(REPLACE "#define SWIG_HEAPTYPES" "// Below is disabled because of https://github.com/swig/swig/issues/3061\n// # define SWIG_HEAPTYPES"
70+
_CONTENTS "${_CONTENTS}")
6771

6872
file(WRITE ${FILE} "${_CONTENTS}")

0 commit comments

Comments
 (0)