Updated Cython compilation and version
This commit is contained in:
parent
85d5486141
commit
9e25496f4d
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = squish
|
name = squish
|
||||||
version = 0.1.4
|
version = 0.1.5
|
||||||
author = Kenneth Jao
|
author = Kenneth Jao
|
||||||
author_email = ksjdragon@gmail.com
|
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.
|
description = squish is Python program which perform simulations for the flow of 'soft' or 'compressible' objects under some energy in a periodic domain.
|
||||||
|
|||||||
62
setup.py
62
setup.py
@ -2,30 +2,48 @@ from setuptools import Extension, setup
|
|||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from Cython.Build import cythonize
|
from Cython.Build import cythonize
|
||||||
USE_CYTHON = True
|
|
||||||
|
USE_CYTHON = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
USE_CYTHON = False
|
USE_CYTHON = False
|
||||||
|
|
||||||
if USE_CYTHON:
|
if USE_CYTHON:
|
||||||
ext_modules = cythonize([
|
ext_modules = cythonize(
|
||||||
Extension(
|
[
|
||||||
"_squish",
|
Extension(
|
||||||
["squish/_squish/_squish.pyx"],
|
"squish.core",
|
||||||
extra_compile_args=['-fopenmp'],
|
["squish/core.pyx"],
|
||||||
extra_link_args=['-fopenmp']
|
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
|
||||||
)
|
),
|
||||||
],
|
Extension(
|
||||||
compiler_directives={
|
"squish.voronoi",
|
||||||
'language_level': 3, 'boundscheck' : False, 'wraparound': False, 'cdivision' : True
|
["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,
|
||||||
|
},
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
ext_modules = [
|
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