Rename 'uninstalled' to development environment
authorThibault Saunier <tsaunier@igalia.com>
Sat, 3 Aug 2019 02:19:04 +0000 (19:19 -0700)
committerThibault Saunier <tsaunier@igalia.com>
Tue, 24 Sep 2019 11:23:07 +0000 (08:23 -0300)
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.

README.md
gst-env.py [moved from gst-uninstalled.py with 98% similarity]
meson.build

index 20f37ab..ba5c8de 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ GStreamer [meson](http://mesonbuild.com/) based repositories aggregrator.
 Check out this module and run meson on it, and it will git clone the other
 GStreamer modules as [meson subprojects](http://mesonbuild.com/Subprojects.html)
 and build everything in one go. Once that is done you can switch into an
 Check out this module and run meson on it, and it will git clone the other
 GStreamer modules as [meson subprojects](http://mesonbuild.com/Subprojects.html)
 and build everything in one go. Once that is done you can switch into an
-uninstalled environment which allows you to easily develop and test the latest
+development environment which allows you to easily develop and test the latest
 version of GStreamer without the need to install anything or touch an existing
 GStreamer system installation.
 
 version of GStreamer without the need to install anything or touch an existing
 GStreamer system installation.
 
@@ -63,14 +63,14 @@ it is built by passing `-Dgst-plugins-good:qt5=enabled` to `meson`. This will
 cause Meson to error out if the plugin could not be enabled. This also works
 for all plugins in all GStreamer repositories.
 
 cause Meson to error out if the plugin could not be enabled. This also works
 for all plugins in all GStreamer repositories.
 
-## Uninstalled environment
+## Development environment target
 
 
-gst-build also contains a special `uninstalled` target that lets you enter an
-uninstalled development environment where you will be able to work on GStreamer
+gst-build also contains a special `devenv` target that lets you enter an
+development environment where you will be able to work on GStreamer
 easily. You can get into that environment running:
 
 ```
 easily. You can get into that environment running:
 
 ```
-ninja -C build/ uninstalled
+ninja -C build/ devenv
 ```
 
 If your operating system handles symlinks, built modules source code will be
 ```
 
 If your operating system handles symlinks, built modules source code will be
@@ -78,7 +78,7 @@ available at the root of `gst-build/` for example GStreamer core will be in
 `gstreamer/`. Otherwise they will be present in `subprojects/`. You can simply
 hack in there and to rebuild you just need to rerun `ninja -C build/`.
 
 `gstreamer/`. Otherwise they will be present in `subprojects/`. You can simply
 hack in there and to rebuild you just need to rerun `ninja -C build/`.
 
-NOTE: In the uninstalled environment, a fully usable prefix is also configured
+NOTE: In the development environment, a fully usable prefix is also configured
 in `gst-build/prefix` where you can install any extra dependency/project.
 
 ## Update git subprojects
 in `gst-build/prefix` where you can install any extra dependency/project.
 
 ## Update git subprojects
@@ -151,7 +151,7 @@ GST_CHECKS=test_subbuffer meson test -C build/ --suite gstreamer gst_gstbuffer
 
 ## Optional Installation
 
 
 ## Optional Installation
 
-`gst-build` has been created primarily for [uninstalled usage](#uninstalled-environment),
+`gst-build` has been created primarily for [development usage](#development-environment-target),
 but you can also install everything that is built into a predetermined prefix like so:
 
 ```
 but you can also install everything that is built into a predetermined prefix like so:
 
 ```
similarity index 98%
rename from gst-uninstalled.py
rename to gst-env.py
index 799e7a4..8668973 100755 (executable)
@@ -273,11 +273,6 @@ def get_windows_shell():
     result = subprocess.check_output(command)
     return result.decode().strip()
 
     result = subprocess.check_output(command)
     return result.decode().strip()
 
-# https://stackoverflow.com/questions/1871549/determine-if-python-is-running-inside-virtualenv
-def in_venv():
-    return (hasattr(sys, 'real_prefix') or
-            (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
-
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(prog="gstreamer-uninstalled")
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(prog="gstreamer-uninstalled")
 
index 5078a57..4b75b41 100644 (file)
@@ -167,9 +167,13 @@ cmdres = run_command(python3, find_program('scripts/generate_plugins_path.py'),
 assert(cmdres.returncode() == 0, 'Could not create plugins path: @0@'.format(cmdres.stderr()))
 
 message('Building subprojects: ' + ', '.join(subprojects_names))
 assert(cmdres.returncode() == 0, 'Could not create plugins path: @0@'.format(cmdres.stderr()))
 
 message('Building subprojects: ' + ', '.join(subprojects_names))
-setenv = find_program('gst-uninstalled.py')
-run_target('uninstalled', command : [setenv, '--builddir=@0@'.format(meson.build_root()),
-          '--srcdir=@0@'.format(meson.source_root())])
+setenv = find_program('gst-env.py')
+
+devenv_cmd = [setenv, '--builddir=@0@'.format(meson.build_root()),
+              '--srcdir=@0@'.format(meson.source_root())]
+
+run_target('uninstalled', command : devenv_cmd)
+run_target('devenv', command : devenv_cmd)
 
 update = find_program('git-update')
 run_target('git-update', command : [update])
 
 update = find_program('git-update')
 run_target('git-update', command : [update])