Hi,

The problem is the following chunk of code from setup.py:

class install(_install):
    """Custom install command."""
    def run(self):
        resource_file = os.path.join(os.path.dirname(__file__),
'gramps', 'gen',
                                     'utils', 'resource-path')
        with io.open(resource_file, 'w', encoding='utf-8',
                     errors='strict') as fp:
            path = os.path.abspath(os.path.join(self.install_data, 'share'))
            if sys.version_info[0] < 3:
                path = unicode(path)
            fp.write(path)

        _install.run(self)

        os.remove(resource_file)

I tried fiddling with the --root & --prefix options to setup.py install,
but this only changes the value of install_data, and thus only the end
of the path that gets stored in the resource-path file.

Because the buildpackage process installs to a temporary location, and
because the "path" variable contains the absolute path to this temporary
location, the resource-path file always stores the wrong path.

Then when you start gramps you get the following error from
gramps/gen/util/resourcepath.py:
ResourcePath.error: Resource Path /home/ross...... is invalid".

I have not tried adding a PYTHONPATH or PYTHONHOME yet. This may help if
it causes GRAMPS_RESOURCES to be populated instead of the NoneType it is
at the moment. But maybe I have to try and set the GRAMPS_RESOURCES
environment variable?

But for now, the patch remains applied:
path = '/usr/share'

Ross


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to