-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
52 lines (45 loc) · 1.47 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
import setuptools
from numpy.distutils.core import Extension, setup
from numpy.distutils.fcompiler import get_default_fcompiler
# from coilpy import __version__
__version__ = "0.4.01"
with open("README.md", "r") as fh:
long_description = fh.read()
# this grabs the requirements from requirements.txt
REQUIREMENTS = [i.strip() for i in open("requirements.txt").readlines()]
# fortran compiler
compiler = get_default_fcompiler()
# set some fortran compiler-dependent flags
f90flags = []
if compiler == "gnu95":
f90flags.append("-ffree-line-length-none")
elif compiler == "intel" or compiler == "intelem":
pass
f90flags.append("-O3")
ext = Extension(
name="coilpy_fortran",
sources=[
"coilpy/fortran/biotsavart.f90",
],
extra_f90_compile_args=f90flags,
)
setup(
name="coilpy",
version=__version__,
description="Plotting and data processing tools for plasma and coil",
long_description=long_description,
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
],
url="https://github.com/zhucaoxiang/CoilPy",
author="Caoxiang Zhu",
author_email="caoxiangzhu@gmail.com",
license="GNU 3.0",
packages=setuptools.find_packages(),
ext_modules=[ext],
install_requires=REQUIREMENTS,
)