mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
Fix build with Python 3.8 by also checking for python-3.X-embed.pc
Since Python 3.8 the normal checks don't include the Python libraries anymore and linking of the gst-python module would fail. See also https://github.com/mesonbuild/meson/issues/5629 Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
This commit is contained in:
parent
986d6d12fb
commit
10707f437f
1 changed files with 9 additions and 2 deletions
11
meson.build
11
meson.build
|
@ -24,10 +24,17 @@ pygobject_dep = dependency('pygobject-3.0', fallback: ['pygobject', 'pygobject_d
|
|||
|
||||
pymod = import('python')
|
||||
python = pymod.find_installation(get_option('python'))
|
||||
if python.language_version().version_compare('<3.0')
|
||||
pythonver = python.language_version()
|
||||
if pythonver.version_compare('<3.0')
|
||||
error('Python2 is not supported anymore, please port your code to python3 (@0@ specified)'.format(python.language_version()))
|
||||
endif
|
||||
python_dep = python.dependency(required : true)
|
||||
|
||||
# Workaround for https://github.com/mesonbuild/meson/issues/5629
|
||||
# https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
|
||||
python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', required: false)
|
||||
if not python_dep.found()
|
||||
python_dep = python.dependency(required : true)
|
||||
endif
|
||||
|
||||
python_abi_flags = python.get_variable('ABIFLAGS', '')
|
||||
pylib_loc = get_option('libpython-dir')
|
||||
|
|
Loading…
Reference in a new issue