~ubuntu-branches/ubuntu/natty/pysvn/natty

« back to all changes in this revision

Viewing changes to Import/pycxx-5.5.0/Demo/setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-23 20:08:08 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223200808-t946skprxzf6vjqx
Tags: 1.6.3-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
//
 
3
// Copyright (c) 1998 - 2007, The Regents of the University of California
 
4
// Produced at the Lawrence Livermore National Laboratory
 
5
// All rights reserved.
 
6
//
 
7
// This file is part of PyCXX. For details,see http://cxx.sourceforge.net/. The
 
8
// full copyright notice is contained in the file COPYRIGHT located at the root
 
9
// of the PyCXX distribution.
 
10
//
 
11
// Redistribution  and  use  in  source  and  binary  forms,  with  or  without
 
12
// modification, are permitted provided that the following conditions are met:
 
13
//
 
14
//  - Redistributions of  source code must  retain the above  copyright notice,
 
15
//    this list of conditions and the disclaimer below.
 
16
//  - Redistributions in binary form must reproduce the above copyright notice,
 
17
//    this  list of  conditions  and  the  disclaimer (as noted below)  in  the
 
18
//    documentation and/or materials provided with the distribution.
 
19
//  - Neither the name of the UC/LLNL nor  the names of its contributors may be
 
20
//    used to  endorse or  promote products derived from  this software without
 
21
//    specific prior written permission.
 
22
//
 
23
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT  HOLDERS AND CONTRIBUTORS "AS IS"
 
24
// AND ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT  LIMITED TO, THE
 
25
// IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR  PURPOSE
 
26
// ARE  DISCLAIMED.  IN  NO  EVENT  SHALL  THE  REGENTS  OF  THE  UNIVERSITY OF
 
27
// CALIFORNIA, THE U.S.  DEPARTMENT  OF  ENERGY OR CONTRIBUTORS BE  LIABLE  FOR
 
28
// ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR CONSEQUENTIAL
 
29
// DAMAGES (INCLUDING, BUT NOT  LIMITED TO, PROCUREMENT OF  SUBSTITUTE GOODS OR
 
30
// SERVICES; LOSS OF  USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER
 
31
// CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT
 
32
// LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY  WAY
 
33
// OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 
34
// DAMAGE.
 
35
//
 
36
//-----------------------------------------------------------------------------
 
37
 
 
38
import os, sys
 
39
from distutils.core import setup, Extension
 
40
 
 
41
support_dir = os.path.normpath(
 
42
                   os.path.join(
 
43
                        sys.prefix,
 
44
                        'share',
 
45
                        'python%d.%d' % (sys.version_info[0],sys.version_info[1]),
 
46
                        'CXX') )
 
47
 
 
48
if os.name == 'posix':
 
49
        CXX_libraries = ['stdc++','m']
 
50
else:
 
51
        CXX_libraries = []
 
52
 
 
53
setup (name = "CXXDemo",
 
54
       version = "5.1",
 
55
       maintainer = "Barry Scott",
 
56
       maintainer_email = "barry-scott@users.sourceforge.net",
 
57
       description = "Demo of facility for extending Python with C++",
 
58
       url = "http://cxx.sourceforge.net",
 
59
       
 
60
       packages = ['CXX'],
 
61
       package_dir = {'CXX': '.'},
 
62
       ext_modules = [
 
63
         Extension('CXX.example',
 
64
                   sources = ['example.cxx',
 
65
                         'range.cxx',
 
66
                         'rangetest.cxx',
 
67
                         os.path.join(support_dir,'cxxsupport.cxx'),
 
68
                         os.path.join(support_dir,'cxx_extensions.cxx'),
 
69
                         os.path.join(support_dir,'IndirectPythonInterface.cxx'),
 
70
                         os.path.join(support_dir,'cxxextensions.c')
 
71
                         ],
 
72
            )
 
73
       ]
 
74
)