Commit e3b2f20d authored by Helen Schottenhamml's avatar Helen Schottenhamml
Browse files

Merge branch 'Fixlbmpysetup' into 'master'

Fix setup

See merge request pycodegen/lbmpy!72
parents 91a0cfad a5438e4e
......@@ -58,14 +58,22 @@ try:
except ImportError:
version = open('RELEASE-VERSION', 'r').read()
def cython_extensions(*extensions):
from distutils.extension import Extension
ext = '.pyx' if USE_CYTHON else '.c'
result = [Extension(e, [e.replace('.', '/') + ext]) for e in extensions]
if USE_CYTHON:
ext = '.pyx'
result = [Extension(e, [os.path.join(*e.split(".")) + ext]) for e in extensions]
from Cython.Build import cythonize
result = cythonize(result, language_level=3)
return result
return result
elif all([os.path.exists(os.path.join(*e.split(".")) + '.c') for e in extensions]):
ext = '.c'
result = [Extension(e, [os.path.join(*e.split(".")) + ext]) for e in extensions]
return result
else:
return None
def readme():
with open('README.md') as f:
......
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