Side-by-side GNU Radio Modules
From SpenchWiki
Configure
With alternate prefix:
./configure --prefix=/usr/local.op25-latest
Alternate environment
Set up the sub-environment to favour the side-by-side module:
~/bin/setenv.op25-latest
#!/bin/sh
LD_LIBRARY_PATH=/usr/local.op25-latest/lib:$LD_LIBRARY_PATH
PYTHONPATH=/usr/local.op25-latest/lib/python2.7/site-packages/gnuradio:/usr/local.op25-latest/lib/python2.7/site-packages:$PYTHON_PATH
# 'export' is necessary
export SUBENV="op25-latest"
bash -i
Show the sub-environment in the shell prompt:
~/.bashrc
if [ -n "$SUBENV" ]; then
PS1="\e[1;31m$SUBENV\e[m $PS1"
fi
Python sitecustomize
Inject side-by-side module in gnuradio namespace (sitecustomize is automatically included by interpreter):
Override original op25 in gnuradio, because:
from gnuradio import op25
would return original op25 installation
/usr/local.op25-latest/lib/python2.7/site-packages/sitecustomize.py
print "Customising for: op25-latest"
import op25
import gnuradio
gnuradio.op25 = op25
Could also:
from gnuradio import op25 as op25_original
...
gnuradio.op25_original = op25_original