This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (65 loc) · 2.11 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import os
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
import numpy
VERSION = '0.2.1'
def write_version_py(filename=None):
if filename is None:
filename = os.path.join(
os.path.dirname(__file__), 'jyulb', 'version.py')
ver = """\
version = '%s'
"""
fh = open(filename, 'wb')
try:
fh.write(ver % VERSION)
finally:
fh.close()
write_version_py()
extensions = [
Extension(
name="jyulb.internal.isothermal.solver",
sources=["jyulb/internal/isothermal/solver.pyx",
"JYU-LB/include/common/node.cpp",
"JYU-LB/include/common/filter.cpp",
"JYU-LB/include/collision/collision.cpp",
"JYU-LB/include/kernel/kernel.cpp",
"JYU-LB/include/solver/solver.cpp"],
include_dirs=['JYU-LB/include/common/',
'JYU-LB/include/dvs/',
'JYU-LB/include/collision/',
'JYU-LB/include/kernel/',
'JYU-LB/include/solver/',
numpy.get_include()],
extra_compile_args=['-fopenmp', '-O3'],
extra_link_args=['-fopenmp', '-O3'],
language="c++",
),
Extension(
name="jyulb.internal.common.domain",
sources=["jyulb/internal/common/domain.pyx",
"JYU-LB/include/common/node.cpp"],
include_dirs=['JYU-LB/include/common/',
numpy.get_include()],
extra_compile_args=['-fopenmp', '-O3'],
extra_link_args=['-fopenmp', '-O3'],
language="c++",
)
]
setup(
name='jyulb_engine',
version=VERSION,
author='SimPhoNy FP7 European Project',
description='Implementation of JYU-LB wrappers',
packages=find_packages(),
install_requires=['simphony~=0.4'],
ext_modules=cythonize(extensions),
entry_points={
'simphony.engine': [
'jyulb_fileio_isothermal =' +
'jyulb.fileio.isothermal.jyulb_engine',
'jyulb_internal_isothermal =' +
'jyulb.internal.isothermal.jyulb_engine'
]
},
)