setup.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 from distutils.core import setup, Extension
4 import sys
5 import os
6 import platform
7 
8 opcua_server_path = os.environ.get('OPCUA_Server_PATH','..')
9 
10 extra_compile_args = [
11  '-std=c++11',
12  '-pthread',
13  '-Wall',
14  '--param=max-vartrack-size=0',
15 ]
16 
17 extra_link_args = [
18  '-pthread',
19 ]
20 
21 include_dirs = [
22  os.path.join(opcua_server_path,'include'),
23 ]
24 
25 library_dirs = [
26  os.path.join(opcua_server_path,'.libs'),
27  os.path.join(opcua_server_path,'lib'),
28 ]
29 
30 boost_library='boost_python3' if sys.version_info[0] == 3 and platform.dist()[0] == 'fedora' else 'boost_python'
31 
32 libraries = [
33  boost_library,
34  'opcuaclient',
35  'opcuaserver',
36 ]
37 
38 if sys.version_info[0] == 2: name='python-freeopcua'
39 else: name='python{}-freeopcua'.format(sys.version_info.major)
40 
41 setup(name=name,
42  version='0.2',
43  description='Python bindings to freeopcua.',
44  author='Matthieu Bec',
45  author_email='mdcb808@gmail.com',
46  url='https://github.com/treww/opcua-python',
47  license = 'LGPL',
48  ext_modules = [
49  Extension(
50  name='opcua',
51  sources=[
52  'src/py_opcua_module.cpp',
53  'src/py_opcua_enums.cpp',
54  'src/py_opcua_enums_ObjectId.cpp',
55  'src/py_opcua_enums_StatusCode.cpp',
56  'src/py_opcua_enums_AttributeId.cpp',
57  'src/py_opcua_subscriptionclient.cpp',
58  ],
59  include_dirs = include_dirs,
60  extra_compile_args = extra_compile_args,
61  extra_link_args = extra_link_args,
62  library_dirs = library_dirs,
63  libraries = libraries,
64  ),
65  ]
66 )
67 
std::string format(CStringRef format_str, ArgList args)
Definition: format.h:3686


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:07