This repository was archived by the owner on Nov 10, 2022. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
47 lines (40 loc) · 1.27 KB
/
Copy pathsetup.py
File metadata and controls
47 lines (40 loc) · 1.27 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
#!/usr/bin/python3
fromdistutils.coreimportsetup, Extension
fromdistutils.sysconfigimportget_python_lib, get_python_inc
importos
importsubprocess
# This seems kind of arbitrary, is there a better way ?
numpy_include=get_python_lib(True) +'/numpy/core/include'
ifos.name=='nt':
extra_compile_args= ["-mnop-fun-dllimport"]
else:
extra_compile_args= []
# set fortran library depending on type of compiler
try:
ifos.environ['FC'] =='g77':
libfortran='g2c'
else:
libfortran='gfortran'
exceptKeyError:
libfortran='gfortran'
# run the Makefile
subprocess.Popen(['make','libs']).wait()
simulator=Extension('simulator_',
define_macros= [('LIBNAME', 'simulator')],
include_dirs= ['./include', numpy_include],
sources= ['./module/simulatormodule.c'],
library_dirs=['./libs'],
libraries=['simulator', 'superlu', 'lapack', 'blas', 'toms', 'cephes',
'calc', 'data', libfortran],
extra_compile_args=extra_compile_args)
setup(name='eispice',
version='0.11.6',
description='eispice Circuit Simulator',
author='Charles Eidsness',
author_email='charles@thedigitalmachine.net',
url='http://www.thedigitalmachine.net/eispice.html',
license="GPL",
ext_modules= [simulator],
package_dir={'': 'module'},
packages=[''],
extra_path='eispice')