Commit 95934162 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fixes in setup.py

- version has to be obtained from file when no git repo is available
  like in tar-ball distributed by pypi
parent d91d3221
include README.md
include COPYING.txt
include RELEASE-VERSION
......@@ -6,8 +6,6 @@ import distutils
from distutils.extension import Extension
from contextlib import redirect_stdout
from importlib import import_module
sys.path.insert(0, os.path.abspath('doc'))
from version_from_git import version_number_from_git
if '--use-cython' in sys.argv:
USE_CYTHON = True
......@@ -68,9 +66,19 @@ def cython_extensions(*extensions):
return result
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='pystencils',
version=version_number_from_git(),
description='Speeding up stencil computations on CPUs and GPUs',
version=version,
long_description=readme(),
long_description_content_type="text/markdown",
author='Martin Bauer',
......@@ -107,5 +115,5 @@ setup(name='pystencils',
python_requires=">=3.6",
cmdclass={
'quicktest': SimpleTestRunner
}
},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment