source: trunk/setup.py.in @ 218

Last change on this file since 218 was 218, checked in by bas, 14 years ago

setup.py.in:

  • clean up old code. Only support pbs-config installations
File size: 1.3 KB
Line 
1#!/usr/bin/env python
2#
3# $Id: setup.py 434 2005-11-04 15:02:07Z bas $
4#
5# set ts=4
6#
7
8import sys
9import os
10
11from distutils.core import setup, Extension
12
13# Try some usefule defaults if not set
14#
15PBS_LIB_DIR='@pbs_library_dir@'
16
17if not PBS_LIB_DIR:
18        print 'Please specify where the PBS libraries are!!'
19        print 'edit setup.py and fill in the PBS_LIB_DIR variable'
20        sys.exit(1)
21
22# Test if we have all the libs:
23#
24LIBS = [PBS_LIB_DIR]
25
26### Make symlinks to right torque version
27#
28VERSION = "@pbs_version@"
29tmp = VERSION.split('.')
30major_version = '.'.join( tmp[0:2] )
31
32
33os.chdir('src')
34
35## Always unlink previous links
36#
37try:
38        os.unlink('pbs.py')
39        os.unlink('pbs_wrap.c')
40except OSError:
41        pass
42
43if major_version in [ '2.3', '2.4']:
44        os.symlink('pbs_wrap_2.4.c', 'pbs_wrap.c')
45        os.symlink('pbs_2.4.py', 'pbs.py')
46else:
47        os.symlink('pbs_wrap_2.1.c', 'pbs_wrap.c')
48        os.symlink('pbs_2.1.py', 'pbs.py')
49
50os.chdir('..')
51
52setup ( name = 'pbs_python',
53        version = '4.0.0',
54        description = 'openpbs/torque python interface',
55        author = 'Bas van der Vlies',
56        author_email = 'basv@sara.nl',
57        url = 'http://subtrac.sara.nl/oss/pbs_python',
58
59
60        extra_path = 'pbs',
61                package_dir = { '' : 'src' }, 
62                py_modules = [ 'pbs', 'PBSQuery' ], 
63
64        ext_modules = [ 
65                Extension( '_pbs', ['src/pbs_wrap.c'],
66                library_dirs = [ PBS_LIB_DIR ])
67                #libraries = [PBS_LIB_DIR])
68        ]
69)
Note: See TracBrowser for help on using the repository browser.