Updated Cython compilation and version
This commit is contained in:
parent
85d5486141
commit
9e25496f4d
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = squish
|
||||
version = 0.1.4
|
||||
version = 0.1.5
|
||||
author = Kenneth Jao
|
||||
author_email = ksjdragon@gmail.com
|
||||
description = squish is Python program which perform simulations for the flow of 'soft' or 'compressible' objects under some energy in a periodic domain.
|
||||
|
||||
46
setup.py
46
setup.py
@ -3,29 +3,47 @@ import numpy
|
||||
|
||||
try:
|
||||
from Cython.Build import cythonize
|
||||
|
||||
USE_CYTHON = True
|
||||
except ImportError:
|
||||
USE_CYTHON = False
|
||||
|
||||
if USE_CYTHON:
|
||||
ext_modules = cythonize([
|
||||
ext_modules = cythonize(
|
||||
[
|
||||
Extension(
|
||||
"_squish",
|
||||
["squish/_squish/_squish.pyx"],
|
||||
extra_compile_args=['-fopenmp'],
|
||||
extra_link_args=['-fopenmp']
|
||||
)
|
||||
"squish.core",
|
||||
["squish/core.pyx"],
|
||||
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
|
||||
),
|
||||
Extension(
|
||||
"squish.voronoi",
|
||||
["squish/voronoi.pyx"],
|
||||
extra_compile_args=["-fopenmp"],
|
||||
extra_link_args=["-fopenmp"],
|
||||
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
|
||||
),
|
||||
Extension(
|
||||
"squish.energy",
|
||||
["squish/energy.pyx"],
|
||||
extra_compile_args=["-fopenmp"],
|
||||
extra_link_args=["-fopenmp"],
|
||||
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
|
||||
),
|
||||
],
|
||||
annotate=False,
|
||||
compiler_directives={
|
||||
'language_level': 3, 'boundscheck' : False, 'wraparound': False, 'cdivision' : True
|
||||
})
|
||||
"language_level": 3,
|
||||
"boundscheck": False,
|
||||
"wraparound": False,
|
||||
"cdivision": True,
|
||||
},
|
||||
)
|
||||
else:
|
||||
ext_modules = [
|
||||
Extension('squish._squish', ["squish/_squish/_squish.c"])
|
||||
Extension("squish.core", ["squish/core.c"]),
|
||||
Extension("squish.voronoi", ["squish/voronoi.c"]),
|
||||
Extension("squish.energy", ["squish/energy.c"]),
|
||||
]
|
||||
|
||||
#annotate='fullc'
|
||||
setup(
|
||||
ext_modules = ext_modules,
|
||||
include_dirs = [numpy.get_include()]
|
||||
)
|
||||
setup(ext_modules=ext_modules, include_dirs=[numpy.get_include()])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user