The pcfile argument passed to get_target_install_filename() is
guaranteed to be a Path() object so use the .open() method to open the
file instead of the standard open() function.
This makes it possible to run gst-env.py on older systems with pyhton3.5
where the standard open() function cannot handle Path arguments.
The change fixes errors like the following:
-----------------------------------------------------------------------
$ ninja -C build/ devenv
ninja: Entering directory `build/'
[0/1] Running external command devenv
Traceback (most recent call last):
File "/home/ao2/gst-build/gst-env.py", line 493, in <module>
env = get_subprocess_env(options, gst_version)
File "/home/ao2/gst-build/gst-env.py", line 342, in get_subprocess_env
elif is_gio_module(target, filename, options.builddir):
File "/home/ao2/gst-build/gst-env.py", line 121, in is_gio_module
giomoduledir = PurePath(get_pkgconfig_variable(builddir, 'gio-2.0', 'giomoduledir'))
File "/home/ao2/gst-build/gst-env.py", line 110, in get_pkgconfig_variable
return get_pkgconfig_variable_from_pcfile(pcfile, varname)
File "/home/ao2/gst-build/gst-env.py", line 89, in get_pkgconfig_variable_from_pcfile
with open(pcfile, 'r', encoding='utf-8') as f:
TypeError: invalid file: PosixPath('/home/ao2/gst-build/build/meson-private/gio-2.0.pc')
FAILED: meson-devenv
-----------------------------------------------------------------------
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/192>
Python `set`s have a random ordering. To avoid creating a random
environment, create sorted lists before iterating over them.
Our Rust crates instruct cargo to rebuild if `PKG_CONFIG_PATH` changes,
so this has been causing unnecessary rebuilds.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/177>
`bdir[1:]` is supposed to convert `/path/to/bdir` to `path/to/bdir`
which is only correct on UNIX. On Windows it will convert
`C:\path\to\bdir` to `:\path\to\bdir` which is totally wrong.
Use pathlib instead, which makes it trivial to do the conversion using
`joinpath(*bdir.parts)`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/160>
This is needed to use gst-uninstalled mode over NFS when gst-build is a
worktree. When this is the case, the .git is a file that links to the original
git tree, but this tree is unlikely to be visible over NFS. Instead of forcing
NFS contorsion, simply ignore the error.
allow for workflows that don't want the gst scripts to start shells,
this can be awkward for higher-level scripts setting up shells
themselves.
this is especially useful in combination with eval, and mimics the sort
of thing you can do with ssh-agent -s.
So gst-build/prefix/etc/xdg/tizonia/tizonia.conf can be found.
Which one contains path to tizonia plugins. Useful when
compiling tizonia-openmax-il and installing it in gst-build
's prefix location:
autoreconf -ifs
./configure --disable-player
--without-libspotify
--prefix=path_to_gst-build/prefix/
make && make install
Allows the following to work:
gst-launch-1.0 videotestsrc ! vp8enc ! omxvp8dec ! xvimagesink
This is the wrong operator to use, which only seems to work because
`os.name` and `'nt'` happen to be the same object. Python 3.8 also
produces a `SyntaxWarning` when encountering this pattern.
On Linux, the library file is stored in the platform triplet directory under the
lib directory (hence for example
lib/x86_64-linux-gnu/gstreamer-1.0/libgstfoo.so) so the regex needs to take this
into account.
With this change the LD_LIBRARY_PATH on Linux now contains only the directories
with gst libs, ignoring the plugins, as initially intended in
c6613d8da2.
Fixes#56
At least in Meson 0.49, the target['install_name'] is a string, not a list, so
the heuristics declared in the is_library_target_and_not_plugin() can't apply
because Python is actually happy to iterate over a string without any warning.
In the case of wine, the env can not be uninstalled, also developers
do not necessiraly care about the fact that it is "uninstalled", the
important thing is that it is a development environment, meaning
that they can work on GStreamer or with GStreamer in the environment.
I still keep the `uninstalled` target to avoid changing people's
habits for now.