Finding application data after install - a solution?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Mon Sep 21 22:52:39 EDT 2009
En Sat, 19 Sep 2009 12:03:52 -0300, Wolodja Wentland
<wentland at cl.uni-heidelberg.de> escribió:
> reliably finding distribution data from your program seems to be an
> unsolved issue for programs packaged with distutils.
>
> I have seen a lot of code that manipulates mod.__file__ to solve this
> problem, but this *will* break for some installation schemes and has the
> following problems:
>
> * it breaks if the user specified '--install-data' to have a different
> value than '--install-{pure,plat}lib'
> * it makes the life of linux distribution package maintainers
> unneccessarily hard, because they have to patch your code so it works
> with their file system hierarchy.
> * it does not work inside eggs
> * it is ugly ;-)
Isn't pkgutil.get_data() what you're looking for?
I'm not sure it covers all your use cases though.
--
Gabriel Genellina
More information about the Python-list
mailing list