# HG changeset patch # User cmlenz # Date 1174416720 0 # Node ID d698a5556a550bf2fcd8a6c8c90a5661c7e48276 # Parent 7589a0e51001d80532b38ca0dd6c8a97d604fb60 Set the `__version__` property in `genshi.__init__`; only works with a setuptools install, though. Addresses #103. diff --git a/genshi/__init__.py b/genshi/__init__.py --- 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