How do I tell the MacPorts Python to look in /opt/local/lib for dylibs?
Libraries are usually referenced using absolute paths on OS X, making it unnecessary to set any variables. Your otool -L output on the Python module should thus contain

/opt/local/lib/libgnuradio-grgsm.$version.dylib (...)


This path is copied from what Apple calls the "shared library identification name" in a library when you link against it. That means that whatever value is in the output of otool -L on the Python module is the same value that you get by running otool -D on /opt/local/lib/libgnuradio-grgsm.dylib (or just using otool -L and looking at the first line). If you do this on your machine, you will notice that it also does not contain an absolute path. That's the root cause of the issue you see.

First, this is a bug in GNU Radio, or MacPorts' packaging of GNU Radio. Please file a ticket so this can get fixed or addressed with the GNU Radio developers.

Second, there are a couple of ways to work around this issue for now:


Method A: Fix the identification name of libgnuradio-grgsm.dylib. This can be done using install_name_tool -id $correctID /opt/local/lib/libgnuradio-grgsm.dylib. Note that the absolute path to the unversioned dylib is likely not the correct value for this. libgnuradio-grgsm.dylib is likely a symlink to another symlink with the major version embedded. This path is the one that should be used as install name. After this change, rebuilding the Python module should solve the issue.
Method B: Fix the path in the load command of the Python module. Use install_name_tool -change libgnuradio-grgsm.dylib $correctID /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/grgsm/_grgsm_swig.so to do this. $correctID should be chosen as explained in Method A.