summaryrefslogtreecommitdiffstats
path: root/tags/cpp-1.0-incubating-M2-RC2/sca/runtime/extensions/python/src/tuscany/sca/python/sca_setup.py
blob: 9363d5533f76945f2894f8aa5301328bd3613b46 (plain)
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
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
# 
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
# 
# 
# This Python code builds and/or installs the sca and 
# sca_proxy extension modules
# 
# Build/install with the following comands:
# python scaSetup.py build
# python scaSetup.py install
# 
# 

from distutils.core import setup, Extension, os

TUSCANY_SCACPP = os.environ.get("TUSCANY_SCACPP")
print 'Using TUSCANY_SCACPP at ' + TUSCANY_SCACPP

TUSCANY_SDOCPP = os.environ.get("TUSCANY_SDOCPP")
print 'Using TUSCANY_SDOCPP at ' + TUSCANY_SDOCPP

macros = []
if os.name == 'nt':
    macros = [ ('WIN32',None) ]

module1 = Extension('sca',
                    define_macros = macros,
                    sources = ['sca_module.cpp'],
                    include_dirs = [ TUSCANY_SCACPP + '/include',
                                     TUSCANY_SCACPP + '/extensions/python/include',
                                     TUSCANY_SDOCPP + '/include'],
                    libraries = ['tuscany_sca',
                                 'tuscany_sdo',
                                 'tuscany_sca_python'],
                    library_dirs = [ TUSCANY_SCACPP + '/lib',
                                     TUSCANY_SCACPP + '/extensions/python/lib',
                                     TUSCANY_SDOCPP + '/lib'])

setup (name = 'sca',
       version = '1.0',
       description = 'The Tuscany SCA package',
       url='http://incubator.apache.org/tuscany/',
       ext_modules = [module1],
       py_modules = ['sca_proxy'])