-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
62 lines (58 loc) · 2.22 KB
/
Copy pathsetup.py
File metadata and controls
62 lines (58 loc) · 2.22 KB
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
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy as np
with open("README.md", "r") as fh:
long_description = fh.read()
extensions = [
Extension(
name="splitfxm.derivatives",
sources=["splitfxm/derivatives.pyx"],
include_dirs=[np.get_include()], # Include NumPy headers
# Disable deprecated API warnings
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')]
),
Extension(
"splitfxm.flux", # Assuming `flux.pyx` is in `splitfxm` package
sources=["splitfxm/flux.pyx"],
include_dirs=[np.get_include()],
# Disable deprecated API warnings
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')]
)
]
# Common compile arguments for all extensions
# Disable fallthrough warnings
common_compile_args = []
common_link_args = []
# Apply common compile arguments globally
for ext in extensions:
ext.extra_compile_args = common_compile_args
ext.extra_link_args = common_link_args
setup(
name="splitfxm",
version="0.5.2",
description="1D Finite-Difference/Volume Split Newton Solver",
url="https://github.com/gpavanb1/SplitFXM",
author="gpavanb1",
author_email="gpavanb@gmail.com",
license="CC BY-NC 4.0 for non-commercial use, commercial license available",
packages=["splitfxm", "splitfxm.equations", "splitfxm.models"],
include_package_data=True,
install_requires=["numpy", "numdifftools", "matplotlib", "splitnewton"],
long_description=long_description,
long_description_content_type="text/markdown",
classifiers=[
"Topic :: Scientific/Engineering :: Mathematics",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
],
keywords="amr newton python finite-difference armijo optimization pseudotransient splitting",
project_urls={ # Optional
"Bug Reports": "https://github.com/gpavanb1/SplitFXM/issues",
"Source": "https://github.com/gpavanb1/SplitFXM/",
},
zip_safe=False,
ext_modules=cythonize(extensions, compiler_directives={
'language_level': "3"}),
)