Release 1.21.90
[platform/upstream/gstreamer.git] / subprojects / gst-python / meson.build
index 5ec92f6..336065d 100644 (file)
@@ -1,6 +1,6 @@
-project('gst-python', 'c', 'cpp',
-  version : '1.19.2.1',
-  meson_version : '>= 0.54',
+project('gst-python', 'c',
+  version : '1.21.90',
+  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
 
@@ -88,6 +87,8 @@ cdata.set('PYTHON_VERSION', '"@0@"'.format(python_dep.version()))
 configure_file(output : 'config.h', configuration : cdata)
 configinc = include_directories('.')
 
+meson.add_dist_script('scripts/gen-changelog.py', meson.project_name(), '1.20.0', meson.project_version())
+
 pkgconfig = import('pkgconfig')
 plugins_install_dir = join_paths(libdir, 'gstreamer-1.0')
 plugins_pkgconfig_install_dir = join_paths(plugins_install_dir, 'pkgconfig')
@@ -97,5 +98,13 @@ if get_option('default_library') == 'shared'
 endif
 
 subdir('gi')
-subdir('plugin')
-subdir('testsuite')
+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