-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
32 lines (27 loc) · 953 Bytes
/
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
import os
import sys
import numpy as np
from setuptools import Extension, setup
if sys.platform == 'darwin':
libsrc = 'Darwin'
compiler = 'clang'
elif sys.platform.startswith('linux'):
libsrc = 'Linux'
compiler = 'gcc'
else:
libsrc = None
epics_inc = os.getenv("EPICS_BASE") + "/include"
epics_lib = os.getenv("EPICS_BASE") + "/lib/" + os.getenv("EPICS_HOST_ARCH")
numpy_inc = np.get_include()
numpy_lib = np.__path__[0]
pyca = Extension('pyca',
language='c++',
sources=['pyca/pyca.cc'],
include_dirs=['pyca', epics_inc,
epics_inc + '/os/' + libsrc,
epics_inc + '/compiler/' + compiler,
numpy_inc],
library_dirs=[epics_lib, numpy_lib],
runtime_library_dirs=[epics_lib, numpy_lib],
libraries=['Com', 'ca'])
setup(ext_modules=[pyca,])