meson: Workaround python 3.12 warning

When we are building againt python 3.12, ignore redundant-decls warning
that will come from the python headers.

```
/usr/include/python3.12/longobject.h:10:26: warning: redundant redeclaration of ‘PyLong_Type’ [-Wredundant-decls]
   10 | PyAPI_DATA(PyTypeObject) PyLong_Type;
      |                          ^~~~~~~~~~~
```

https://github.com/python/cpython/issues/106560

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5541>
This commit is contained in:
Jordan Petridis 2023-10-24 06:10:53 +03:00 committed by GStreamer Marge Bot
parent a238caebbb
commit bbdf6d4653

View file

@ -156,9 +156,11 @@ elif build_gir
if python.found() if python.found()
# Workaround for https://github.com/mesonbuild/meson/issues/5629 # Workaround for https://github.com/mesonbuild/meson/issues/5629
pythonver = python.language_version() pythonver = python.language_version()
python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', required: false) python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3',
required: false, include_type: 'system')
if not python_dep.found() if not python_dep.found()
python_dep = python.dependency(required : get_option('python')) python_dep = python.dependency(required : get_option('python'),
include_type: 'system')
endif endif
else else
python_dep = dependency('', required: false) python_dep = dependency('', required: false)