diff --git a/setup.py b/setup.py index 2c67c669f5f6a896660d0c2dcfbecf420c325e7e..2d1980bb6ae4de5651da329bd794b58b2c8f7e0d 100644 --- a/setup.py +++ b/setup.py @@ -44,9 +44,18 @@ class SimpleTestRunner(distutils.cmd.Command): for test in quick_tests: self._run_tests_in_module(test) +try: + sys.path.insert(0, os.path.abspath('doc')) + from version_from_git import version_number_from_git + + version = version_number_from_git() + with open("RELEASE-VERSION", "w") as f: + f.write(version) +except ImportError: + version = open('RELEASE-VERSION', 'r').read() setup(name='lbmpy', - version=version_number_from_git(), + version=version, description='Code Generation for Lattice Boltzmann Methods', author='Martin Bauer', license='AGPLv3',