forked from tmolteno/python-necpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (55 loc) · 2.12 KB
/
setup.py
File metadata and controls
63 lines (55 loc) · 2.12 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
63
#!/usr/bin/env python
"""
setup.py file for necpp Python module.
"""
from setuptools import setup, Extension
from glob import glob
import os
nec_sources = []
nec_sources.extend([fn for fn in glob('necpp_src/src/*.cpp')
if not os.path.basename(fn).endswith('_tb.cpp')
if not os.path.basename(fn).startswith('net_solve.cpp')
if not os.path.basename(fn).startswith('nec2cpp.cpp')
if not os.path.basename(fn).startswith('necDiff.cpp')])
nec_sources.extend(glob("necpp_wrap.c"))
nec_headers = []
nec_headers.extend(glob("necpp_src/src/*.h"))
nec_headers.extend(glob("necpp_src/config.h"))
# At the moment, the config.h file is needed, and this should be generated from the ./configure
# command in the parent directory. Use ./configure --without-lapack to avoid dependance on LAPACK
#
necpp_module = Extension('_necpp',
sources=nec_sources,
include_dirs=['necpp_src/src/', 'necpp_src/'],
depends=nec_headers,
define_macros=[('BUILD_PYTHON', '1')]
)
with open('README.md') as f:
readme = f.read()
setup (name = 'necpp',
version = '1.7.3.5',
author = "Tim Molteno",
author_email = "tim@physics.otago.ac.nz",
url = "http://github.com/tmolteno/necpp",
keywords = "nec2 nec2++ antenna electromagnetism radio",
description = "Python Antenna Simulation Module (nec2++) C-style interface",
long_description=readme,
long_description_content_type="text/markdown",
include_package_data=True,
data_files=[('examples', ['necpp_src/example/test.py'])],
ext_modules = [necpp_module],
py_modules = ["necpp"],
license='GPLv2',
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Scientific/Engineering",
"Topic :: Communications :: Ham Radio",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
"Intended Audience :: Science/Research"]
)