-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (43 loc) · 1.41 KB
/
setup.py
File metadata and controls
51 lines (43 loc) · 1.41 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
import platform
import sys
import epicscorelibs.path
import epicscorelibs.version
import numpy
from epicscorelibs.config import get_config_var
from numpy import get_include
from setuptools_dso import Extension, setup
def get_numpy_include_dirs():
return [get_include()]
extra = []
if sys.platform == 'linux2':
extra += ['-v']
elif platform.system() == 'Darwin':
# avoid later failure where install_name_tool may run out of space.
# install_name_tool: changing install names or rpaths can't be redone for:
# ... because larger updated load commands do not fit (the program must be relinked,
# and you may need to use -headerpad or -headerpad_max_install_names)
extra += ['-Wl,-headerpad_max_install_names']
pyca = Extension(
name='pyca',
sources=['pyca/pyca.cc'],
include_dirs=get_numpy_include_dirs() + [epicscorelibs.path.include_path],
define_macros=get_config_var('CPPFLAGS'),
extra_compile_args=get_config_var('CXXFLAGS'),
extra_link_args=get_config_var('LDFLAGS') + extra,
dsos=[
'epicscorelibs.lib.ca',
'epicscorelibs.lib.Com'
],
libraries=get_config_var('LDADD'),
)
setup(
name='pyca',
description='python channel access library',
packages=['psp', 'pyca'],
ext_modules=[pyca],
install_requires=[
epicscorelibs.version.abi_requires(),
'numpy >=%s' % numpy.version.short_version,
],
zip_safe=False,
)