-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathsetup.py
executable file
·46 lines (37 loc) · 1.29 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
#!/usr/bin/env python
"""PyAMG: Algebraic Multigrid Solvers in Python.
PyAMG is a library of Algebraic Multigrid (AMG)
solvers with a convenient Python interface.
PyAMG features implementations of:
- Ruge-Stuben (RS) or Classical AMG
- AMG based on Smoothed Aggregation (SA)
- Adaptive Smoothed Aggregation (aSA)
- Compatible Relaxation (CR)
- Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc
PyAMG is primarily written in Python with
supporting C++ code for performance critical operations.
"""
from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension, build_ext
amg_core_headers = ['air',
'evolution_strength',
'graph',
'krylov',
'linalg',
'relaxation',
'ruge_stuben',
'smoothed_aggregation']
ext_modules = [
Pybind11Extension(f'pyamg.amg_core.{f}',
sources=[f'pyamg/amg_core/{f}_bind.cpp'],
)
for f in amg_core_headers]
ext_modules += [
Pybind11Extension('pyamg.amg_core.tests.bind_examples',
sources=['pyamg/amg_core/tests/bind_examples_bind.cpp'],
)
]
setup(
ext_modules=ext_modules,
cmdclass={'build_ext': build_ext},
)