Skip to content
Snippets Groups Projects
Commit b223a5d9 authored by Martin Bauer's avatar Martin Bauer
Browse files

Bugfix - determine version number from file when no git repo is available

parent e586475c
No related branches found
No related merge requests found
include README.md include README.md
include COPYING.txt include COPYING.txt
include RELEASE-VERSION
...@@ -45,8 +45,24 @@ class SimpleTestRunner(distutils.cmd.Command): ...@@ -45,8 +45,24 @@ class SimpleTestRunner(distutils.cmd.Command):
self._run_tests_in_module(test) self._run_tests_in_module(test)
def readme():
with open('README.md') as f:
return f.read()
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', setup(name='lbmpy',
version=version_number_from_git(), version=version,
long_description=readme(),
description='Code Generation for Lattice Boltzmann Methods', description='Code Generation for Lattice Boltzmann Methods',
author='Martin Bauer', author='Martin Bauer',
license='AGPLv3', license='AGPLv3',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment