# HG changeset patch # User cmlenz # Date 1174416720 0 # Node ID 11355f9db50cb6abad9b5e91ac4981c7192c6aa1 # Parent 56bbe1d94da0f18a3f1eae81e005d6a21d7943d1 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