mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
gst-env: Handle installing python modules to dist-packages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3848>
This commit is contained in:
parent
9b4b4b51a3
commit
35b9295087
1 changed files with 6 additions and 1 deletions
|
@ -430,8 +430,13 @@ def get_subprocess_env(options, gst_version):
|
||||||
# /usr/lib/site-packages/foo/bar.py , we will not add anything
|
# /usr/lib/site-packages/foo/bar.py , we will not add anything
|
||||||
# to PYTHONPATH, but the current approach works with pygobject
|
# to PYTHONPATH, but the current approach works with pygobject
|
||||||
# and gst-python at least.
|
# and gst-python at least.
|
||||||
|
py_package = None
|
||||||
if 'site-packages' in installpath_parts:
|
if 'site-packages' in installpath_parts:
|
||||||
install_subpath = os.path.join(*installpath_parts[installpath_parts.index('site-packages') + 1:])
|
py_package = 'site-packages'
|
||||||
|
elif 'dist-packages' in installpath_parts:
|
||||||
|
py_package = 'dist-packages'
|
||||||
|
if py_package:
|
||||||
|
install_subpath = os.path.join(*installpath_parts[installpath_parts.index(py_package) + 1:])
|
||||||
if path.endswith(install_subpath):
|
if path.endswith(install_subpath):
|
||||||
if os.path.commonprefix(["gi/overrides", install_subpath]):
|
if os.path.commonprefix(["gi/overrides", install_subpath]):
|
||||||
overrides_dirs.add(os.path.dirname(path))
|
overrides_dirs.add(os.path.dirname(path))
|
||||||
|
|
Loading…
Reference in a new issue