diff --git a/RobotFrameworkElasticSearchLibrary/__init__.py b/RobotFrameworkElasticSearchLibrary/__init__.py index 61b3bc8..d0dfb97 100644 --- a/RobotFrameworkElasticSearchLibrary/__init__.py +++ b/RobotFrameworkElasticSearchLibrary/__init__.py @@ -1,5 +1,3 @@ -# Version of the RobotFrameworkElasticSearchLibrary package -__version__ = "0.0.2" from typing import Dict, Optional diff --git a/RobotFrameworkElasticSearchLibrary/version.py b/RobotFrameworkElasticSearchLibrary/version.py new file mode 100644 index 0000000..97de229 --- /dev/null +++ b/RobotFrameworkElasticSearchLibrary/version.py @@ -0,0 +1,2 @@ +# Version of the RobotFrameworkElasticSearchLibrary package +__version__ = "0.0.4" diff --git a/setup.py b/setup.py index 2dd161e..618119c 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,14 @@ import pathlib +from distutils import dirname from setuptools import setup -from RobotFrameworkElasticSearchLibrary import __version__ +import os + + +version_file = os.path.join(dirname(os.path.abspath(__file__)), 'RobotFrameworkElasticSearchLibrary', 'version.py') + +with open(version_file) as file: + code = compile(file.read(), version_file, 'exec') + exec(code) # The directory containing this file HERE = pathlib.Path(__file__).parent