Mercurial > genshi > mirror
changeset 424:11355f9db50c trunk
Set the `__version__` property in `genshi.__init__`; only works with a setuptools install, though. Addresses #103.
author | cmlenz |
---|---|
date | Tue, 20 Mar 2007 18:52:00 +0000 |
parents | 56bbe1d94da0 |
children | 073640758a42 |
files | genshi/__init__.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/genshi/__init__.py +++ b/genshi/__init__.py @@ -19,5 +19,10 @@ independently of where or how they are produced. """ +try: + __version__ = __import__('pkg_resources').get_distribution('Genshi').version +except ImportError: + pass + from genshi.core import * from genshi.input import ParseError, XML, HTML