Initial port to python3
[htsworkflow.git] / htsworkflow / util / version.py
1 import logging
2
3 LOGGER = logging.getLogger(__name__)
4
5 def version():
6     """Return version number
7     """
8     version = None
9     try:
10         import pkg_resources
11     except ImportError as e:
12         LOGGER.error("Can't find version number, please install setuptools")
13         raise e
14
15     try:
16         version = pkg_resources.get_distribution("htsworkflow")
17     except pkg_resources.DistributionNotFound as e:
18         LOGGER.error("Package not installed")
19
20     return version
21