summaryrefslogtreecommitdiff
path: root/grc/src/platforms/python/Constants.py.in
diff options
context:
space:
mode:
authorjblum2009-05-28 21:14:27 +0000
committerjblum2009-05-28 21:14:27 +0000
commita635c00f360fafb89e64f04638642e716d075760 (patch)
tree299682a8df27abdf5048888a97cd01798da1fb7e /grc/src/platforms/python/Constants.py.in
parent99aeab73da71d2881e67aba558ff204a0fe51944 (diff)
downloadgnuradio-a635c00f360fafb89e64f04638642e716d075760.tar.gz
gnuradio-a635c00f360fafb89e64f04638642e716d075760.tar.bz2
gnuradio-a635c00f360fafb89e64f04638642e716d075760.zip
Make the hardcoded paths in grc optionally configurable from environment variables: GR_DOCDIR, GR_DATADIR
Allows the grc data files to up-rooted for a package installation (specifically macosx). Hardcoded path is the default when environment variables are undefined. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11161 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/platforms/python/Constants.py.in')
-rw-r--r--grc/src/platforms/python/Constants.py.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/grc/src/platforms/python/Constants.py.in b/grc/src/platforms/python/Constants.py.in
index 502f41550..4a43147fa 100644
--- a/grc/src/platforms/python/Constants.py.in
+++ b/grc/src/platforms/python/Constants.py.in
@@ -20,13 +20,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
import os
import sys
import stat
+from .. base.Constants import PKG_DIR
PYEXEC = '@PYTHONW@'
#setup paths
-DOCS_DIR = os.path.join('@docdir@', 'xml')
-DATA_DIR = '@datadir@'
-BLOCKS_DIR = '@blocksdir@'
+DOCS_DIR = os.path.join(os.environ.get('GR_DOCDIR', '@docdir@'), 'xml')
+DATA_DIR = os.path.join(PKG_DIR, '@reldatadir@')
+BLOCKS_DIR = os.path.join(PKG_DIR, '@relblocksdir@')
HIER_BLOCKS_LIB_DIR = os.path.join(os.path.expanduser('~'), '.grc_gnuradio')
#file creation modes