X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=subprojects%2Fgst-python%2Fmeson.build;h=2748296e4633b29189c2728924988989fa754d4c;hb=9820e58be68004fcfe674eb577efb5cae203c65d;hp=483ff6cbea8880fb484e5d7669abab1f59474ed9;hpb=24c6e498746be85c42a4d123d9d912af257ce4c1;p=platform%2Fupstream%2Fgstreamer.git diff --git a/subprojects/gst-python/meson.build b/subprojects/gst-python/meson.build index 483ff6c..2748296 100644 --- a/subprojects/gst-python/meson.build +++ b/subprojects/gst-python/meson.build @@ -1,6 +1,6 @@ -project('gst-python', 'c', 'cpp', - version : '1.19.2', - meson_version : '>= 0.54', +project('gst-python', 'c', + version : '1.21.1', + meson_version : '>= 0.62', default_options : [ 'warning_level=1', 'c_std=gnu99', 'buildtype=debugoptimized' ]) @@ -19,7 +19,7 @@ gst_dep = dependency('gstreamer-1.0', version : gst_req, fallback : ['gstreamer', 'gst_dep']) gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req, fallback : ['gstreamer', 'gst_base_dep']) -gmodule_dep = dependency('gmodule-2.0') +gmodule_dep = dependency('gmodule-no-export-2.0') pygobject_dep = dependency('pygobject-3.0', fallback: ['pygobject', 'pygobject_dep'], version : '>= 3.8') pymod = import('python') @@ -34,20 +34,19 @@ python_dep = python.dependency(embed:true, required : true) 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 @@ -97,7 +96,13 @@ if get_option('default_library') == 'shared' 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