mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
Add [gst-]python support
This commit is contained in:
parent
080780c720
commit
bf1aa16608
2 changed files with 35 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import site
|
||||
import subprocess
|
||||
|
||||
|
||||
|
@ -12,6 +14,7 @@ def prepend_env_var(env, var, value):
|
|||
env[var] = os.pathsep + value + os.pathsep + env.get(var, "")
|
||||
env[var] = env[var].replace(os.pathsep + os.pathsep, os.pathsep).strip(os.pathsep)
|
||||
|
||||
|
||||
def set_prompt_var(options, env):
|
||||
ps1 = env.get("PS1")
|
||||
if ps1:
|
||||
|
@ -68,6 +71,33 @@ def get_subprocess_env(options):
|
|||
env["GST_PTP_HELPER"] = os.path.normpath(
|
||||
"%s/subprojects/gstreamer/libs/gst/helpers/gst-ptp-helper" % options.builddir)
|
||||
env["GST_REGISTRY"] = os.path.normpath(options.builddir + "/registry.dat")
|
||||
prepend_env_var(env, 'PYTHONPATH', ':'.join(site.getsitepackages()))
|
||||
env["PYTHONPATH"] = env["PYTHONPATH"] + ':' + os.path.normpath(
|
||||
options.builddir + '/subprojects/gst-python')
|
||||
|
||||
filename = "meson.build"
|
||||
sharedlib_reg = re.compile(r'\.so$|\.dylib$')
|
||||
typelib_reg = re.compile(r'.*\.typelib$')
|
||||
for root, dirnames, filenames in os.walk(os.path.join(options.builddir,
|
||||
'subprojects')):
|
||||
has_typelib = False
|
||||
has_shared = False
|
||||
for filename in filenames:
|
||||
if typelib_reg.search(filename) and not has_typelib:
|
||||
has_typelib = True
|
||||
prepend_env_var(env, "GI_TYPELIB_PATH",
|
||||
os.path.join(options.builddir, root))
|
||||
if has_shared:
|
||||
break
|
||||
elif sharedlib_reg.search(filename) and not has_shared:
|
||||
has_shared = True
|
||||
prepend_env_var(env, "LD_LIBRARY_PATH",
|
||||
os.path.join(options.builddir, root))
|
||||
prepend_env_var(env, "DYLD_LIBRARY_PATH",
|
||||
os.path.join(options.builddir, root))
|
||||
if has_typelib:
|
||||
break
|
||||
|
||||
|
||||
set_prompt_var(options, env)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
project('gstreamer uninstalled', 'c', version : '1.9.1.1')
|
||||
project('All GStreamer modules', 'c', version : '1.9.2.1')
|
||||
|
||||
gst_version = meson.project_version()
|
||||
gst_version = '>= @0@'.format(meson.project_version())
|
||||
gst_branch = 'master'
|
||||
|
||||
glib_req = '>= 2.40.0'
|
||||
|
@ -12,7 +12,8 @@ subprojects = [
|
|||
'gst-plugins-ugly',
|
||||
'gst-plugins-bad',
|
||||
'gst-devtools',
|
||||
'gst-editing-services'
|
||||
'gst-editing-services',
|
||||
'gst-python'
|
||||
]
|
||||
|
||||
# FIXME Remove that check once we have ffmpeg as a gst-libav subproject
|
||||
|
|
Loading…
Reference in a new issue