diff options
Diffstat (limited to 'grc/src/platforms/python')
-rw-r--r-- | grc/src/platforms/python/Constants.py.in | 7 | ||||
-rw-r--r-- | grc/src/platforms/python/Makefile.am | 8 |
2 files changed, 8 insertions, 7 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 diff --git a/grc/src/platforms/python/Makefile.am b/grc/src/platforms/python/Makefile.am index 3790b84f0..c23d14792 100644 --- a/grc/src/platforms/python/Makefile.am +++ b/grc/src/platforms/python/Makefile.am @@ -36,13 +36,13 @@ ourpython_PYTHON = \ Port.py \ __init__.py -Constants.py: Makefile Constants.py.in +Constants.py: $(srcdir)/Constants.py.in Makefile sed \ -e 's|@PYTHONW[@]|$(PYTHONW)|g' \ - -e 's|@datadir[@]|$(grc_python_data_dir)|g' \ - -e 's|@blocksdir[@]|$(grc_python_blocks_dir)|g' \ + -e 's|@reldatadir[@]|$(grc_python_data_reldir)|g' \ + -e 's|@relblocksdir[@]|$(grc_blocks_data_reldir)|g' \ -e 's|@docdir[@]|$(gr_docdir)|g' \ - $(srcdir)/$@.in > $@ + $< > $@ EXTRA_DIST = $(srcdir)/Constants.py.in BUILT_SOURCES = Constants.py |