AstunTechnology/QGIS-Gazetteer-Plugin — pull request #1 by walkermatt (2012-08-23 14:05:21+00:00)
Title: Allow relative imports and flexibility in what the plugin folder is called

Hi Nathan,

I tried to install the plugin by cloning the git repo into` /usr/share/qgis/python/plugins/` which resulted in the plugin living in a directory called `QGIS-Gazetteer-Plugin`. When I tried to use the plugin I got an import error in QGIS due to the astun gazetteer not being found as it was looking for it in a directory called `gazetteersearch.gazetteers`.

This small change adds the plugin directory to `sys.path` allowing imports to be relative to the directory the plugin lives in and means that the directory can have any name. I've updated `gazetteersearch.py` to import the gazetteers relative to the plugin root directory.

Cheers,

Matt.