from pybindgen.typehandlers.base import ReturnValue, Parameter
from pybindgen.module import Module
from pybindgen.function import Function
from pybindgen.typehandlers.codesink import CodeSink, FileCodeSink
from pybindgen.cppclass import CppMethod, CppClass, CppConstructor
from pybindgen.enum import Enum
from pybindgen.utils import write_preamble, param, retval
try:
    from pybindgen import version
except ImportError: # the version.py file is generated and may not exist
    pass

from pybindgen.typehandlers.base import ReturnValue, Parameter
from pybindgen.module import Module
from pybindgen.function import Function
from pybindgen.typehandlers.codesink import CodeSink, FileCodeSink
from pybindgen.cppclass import CppMethod, CppClass, CppConstructor
from pybindgen.enum import Enum
from pybindgen.utils import write_preamble, param, retval
try:
    from pybindgen import version
except ImportError: # the version.py file is generated and may not exist
    pass
else:
    __version__ = '.'.join(str(x) for x in version.__version__)

Add a pybindgen.__version__ attribute