summaryrefslogtreecommitdiff
path: root/buildstream/_site.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-11-15 18:14:39 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-11-15 18:14:39 +0900
commit14e8161cf9af49ad49a2d3623913175cbe660dc1 (patch)
treee09e8be82d2666983fd4062c25b73ebdb9feb8a5 /buildstream/_site.py
parent3acb123be6128e07f3ba8d005e3a1a1f24099098 (diff)
downloadbuildstream-14e8161cf9af49ad49a2d3623913175cbe660dc1.tar.gz
_site.py: simplify this file
Now modules import as: from . import _site And refer to things as _site.root, _site.default_config etc. Also now follow principal of least underscores
Diffstat (limited to 'buildstream/_site.py')
-rw-r--r--buildstream/_site.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/buildstream/_site.py b/buildstream/_site.py
index 897c69d81..8c3af7385 100644
--- a/buildstream/_site.py
+++ b/buildstream/_site.py
@@ -21,18 +21,18 @@
import os
#
-# Some information about where we are installed
+# Private module declaring some info about where the buildstream
+# is installed so we can lookup package relative resources easily
#
-_site_info = {}
# The package root, wherever we are running the package from
-_site_info['root'] = os.path.dirname(os.path.abspath(__file__))
+root = os.path.dirname(os.path.abspath(__file__))
# The Element plugin directory
-_site_info['element_plugins'] = os.path.join (_site_info['root'], 'plugins', 'elements')
+element_plugins = os.path.join (root, 'plugins', 'elements')
# The Source plugin directory
-_site_info['source_plugins'] = os.path.join (_site_info['root'], 'plugins', 'sources')
+source_plugins = os.path.join (root, 'plugins', 'sources')
# Default user configuration
-_site_info['default_config'] = os.path.join (_site_info['root'], 'data', 'defaultconfig.yaml')
+default_config = os.path.join (root, 'data', 'defaultconfig.yaml')