project('gst-python', 'c', 'cpp',
- version : '1.19.2',
- meson_version : '>= 0.54',
+ version : '1.19.90',
+ meson_version : '>= 0.59',
default_options : [ 'warning_level=1',
'c_std=gnu99',
'buildtype=debugoptimized' ])
python_abi_flags = python.get_variable('ABIFLAGS', '')
pylib_loc = get_option('libpython-dir')
if pylib_loc == ''
- check_path_exists = 'import os, sys; assert(os.path.exists(sys.argv[1]))'
+ fsmod = import('fs')
pylib_loc = python.get_variable('LIBPL', '')
if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
pylib_ldlibrary = python.get_variable('LDLIBRARY', '')
- if run_command(python, '-c', check_path_exists, join_paths(pylib_loc, pylib_ldlibrary)).returncode() != 0
+ if not fsmod.exists(pylib_loc / pylib_ldlibrary)
# Workaround for Fedora
pylib_loc = python.get_variable('LIBDIR', '')
message('pylib_loc = @0@'.format(pylib_loc))
endif
- assert(
- run_command(python, '-c', check_path_exists, join_paths(pylib_loc, pylib_ldlibrary)).returncode() == 0,
- 'Python dynamic library path could not be determined'
- )
+ if not fsmod.exists(pylib_loc / pylib_ldlibrary)
+ error('Python dynamic library path could not be determined')
+ endif
endif
endif
endif
subdir('gi')
-subdir('plugin')
-subdir('testsuite')
-
-run_command(python, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
+if not get_option('plugin').disabled()
+ if get_option('default_library') != 'static'
+ subdir('plugin')
+ else
+ warning('Python plugin not supported with `static` builds yet.')
+ endif
+endif
+if not get_option('tests').disabled()
+ subdir('testsuite')
+endif