Skip to content
Snippets Groups Projects
Commit dbe3fb45 authored by Markus Holzer's avatar Markus Holzer
Browse files

Use a lokal function for the import of os

parent c6430d35
No related branches found
No related tags found
1 merge request!197Added version number to pystencils
"""Module to generate stencil kernels in C or CUDA using sympy expressions and call them as Python functions"""
import os.path
from . import sympy_gmpy_bug_workaround # NOQA
from . import fd
from . import stencil as stencil
......@@ -22,10 +21,13 @@ try:
except ImportError:
pass
def get_file_path():
import os.path
file_path = os.path.abspath(os.path.dirname(__file__))
return os.path.join(file_path, '../RELEASE-VERSION')
try:
my_path = os.path.abspath(os.path.dirname(__file__))
path = os.path.join(my_path, '../RELEASE-VERSION')
__version__ = open(path, 'r').read()
__version__ = open(get_file_path(), 'r').read()
except IOError:
__version__ = 'Please install pystencils with setup.py'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment