-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
76 lines (63 loc) · 2.68 KB
/
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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
"""Python language binding for the MateCORBA2 CORBA implementation.
PyMateCORBA aims to take advantage of new features found in MateCORBA2 to make
language bindings more efficient. This includes:
- Use of MateCORBA2 type libraries to generate stubs
- use of the MateCORBA_small_invoke_stub() call for operation
invocation, which allows for short circuited invocation on local
objects.
"""
from commands import getoutput
from distutils.core import setup
from distutils.extension import Extension
import os
from dsextras import have_pkgconfig, GLOBAL_MACROS
from dsextras import InstallLib, PkgConfigExtension
MAJOR_VERSION = 2
MINOR_VERSION = 0
MICRO_VERSION = 0
VERSION = "%d.%d.%d" % (MAJOR_VERSION,
MINOR_VERSION,
MICRO_VERSION)
MATECORBA2_REQUIRED = '2.4.4'
GLOBAL_MACROS.append(('MATECORBA2_STUBS_API', 1))
class PyMateCORBAInstallLib(InstallLib):
def run(self):
self.add_template_option('MATECORBA2_REQUIRED_VERSION', MATECORBA2_REQUIRED)
self.prepare()
self.install_template('pymatecorba-2.pc.in',
os.path.join(self.libdir, 'pkgconfig'))
InstallLib.run(self)
matecorba = PkgConfigExtension(name='MateCORBA',
pkc_name='MateCORBA-2.0',
pkc_version=MATECORBA2_REQUIRED,
sources=['src/MateCORBAmodule.c',
'src/pycorba-typecode.c',
'src/pycorba-object.c',
'src/pycorba-method.c',
'src/pycorba-marshal.c',
'src/pycorba-orb.c',
'src/pycorba-any.c',
'src/pycorba-exceptions.c',
'src/pycorba-struct.c',
'src/pycorba-enum.c',
'src/pycorba-fixed.c',
'src/stub-gen.c',
'src/pymatecorba-servant.c',
'src/pymatecorba-poa.c',
'src/pymatecorba-utils.c'])
if not matecorba.can_build():
raise SystemExit
doclines = __doc__.split("\n")
setup(name="pymatecorba",
version=VERSION,
license='LGPL',
platforms=['yes'],
maintainer="James Henstridge",
maintainer_email="[email protected]",
description = doclines[0],
long_description = "\n".join(doclines[2:]),
py_modules=['CORBA', 'PortableServer'],
ext_modules=[matecorba],
data_files=[('include/pymatecorba-2.0', ['src/pymatecorba.h'])],
cmdclass={'install_lib': PyMateCORBAInstallLib})