diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2023-01-27 11:47:22 -0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2023-01-30 16:07:34 +0000 |
commit | ce5d512fb275f5011112c079f3b3b3c3181f1a94 (patch) | |
tree | ba5c5c6b1aeec66748b1ebc35490444c6ce74b23 /gst-env.py | |
parent | b134433e0baa8f0f4831210f356bd6dc7c2a1794 (diff) | |
download | gstreamer-ce5d512fb275f5011112c079f3b3b3c3181f1a94.tar.gz |
gst-env: Handle installing python modules to dist-packages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3826>
Diffstat (limited to 'gst-env.py')
-rwxr-xr-x | gst-env.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst-env.py b/gst-env.py index 76bc87da6e..2a714c28e9 100755 --- a/gst-env.py +++ b/gst-env.py @@ -434,8 +434,13 @@ def get_subprocess_env(options, gst_version): # /usr/lib/site-packages/foo/bar.py , we will not add anything # to PYTHONPATH, but the current approach works with pygobject # and gst-python at least. + py_package = None 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 os.path.commonprefix(["gi/overrides", install_subpath]): overrides_dirs.add(os.path.dirname(path)) |