Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/environ.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-25 23:04:31 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-25 23:04:31 (GMT)
commit91ea798d316865135643a569799f96f98de68ef8 (patch)
tree0c22e6dee60cc9c72d7e35c3c153640f3f78c2eb /devbot/environ.py
parenta0b65ee79f9f5abdee931aa02a3018cb308f6c51 (diff)
Split state out of build script so we can reuse it
Diffstat (limited to 'devbot/environ.py')
-rw-r--r--devbot/environ.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/devbot/environ.py b/devbot/environ.py
index c8b6343..ccdfd3f 100644
--- a/devbot/environ.py
+++ b/devbot/environ.py
@@ -17,10 +17,14 @@ def _add_path(name, path):
os.environ[name] = ":".join(splitted)
+def _get_gst_registry_path():
+ return os.path.join(config.home_dir, "gstreamer.registry")
+
def _setup_variables():
_add_path("LD_LIBRARY_PATH", config.lib_dir)
_add_path("PATH", config.bin_dir)
_add_path("PATH", config.commands_dir)
+ _add_path("GST_REGISTRY", _get_gst_registry_path())
_add_path("XCURSOR_PATH",
os.path.join(config.share_dir, "icons"))
@@ -34,8 +38,6 @@ def _setup_variables():
os.path.join(config.lib_dir, "pkgconfig"))
_add_path("GST_PLUGIN_PATH",
os.path.join(config.lib_dir , "gstreamer-1.0"))
- _add_path("GST_REGISTRY",
- os.path.join(config.home_dir, "gstreamer.registry"))
_add_path("PYTHONPATH",
sysconfig.get_python_lib(prefix=config.prefix_dir))
_add_path("PYTHONPATH",
@@ -75,3 +77,11 @@ def _setup_gconf():
os.environ["GCONF_SCHEMA_INSTALL_SOURCE"] = \
"xml:merged:" + os.path.join(gconf_dir, "gconf.xml.defaults")
+
+def clean():
+ print "Deleting registry"
+
+ try:
+ os.unlink(_get_gst_registry_path())
+ except OSError:
+ pass