File: compile.py

package info (click to toggle)
python-scientific 2.4.11-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,956 kB
  • ctags: 3,063
  • sloc: python: 9,157; ansic: 4,483; xml: 4,145; makefile: 126; sh: 18; csh: 1
file content (35 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (3)
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
# Compile the bsppython executable containing
# the Scientific.BSPlib extension module

# this variable controls the level of sanity checking for the BSPlib
# see bspcc -help
bspLibLevel = 2


# Normally nothing needs to be changed below
import distutils
import distutils.sysconfig
import os  


cfgDict = distutils.sysconfig.get_config_vars()


# Name of the BSP compilation script.
bspcompiler = 'bspcc'
sources='bsppython.c Scientific_bsplib.c'


cmd = '%s %s -o bsppython -flibrary-level %d -I%s %s -L%s -lpython%s %s %s' % \
    (bspcompiler, 
    cfgDict['LINKFORSHARED'],
    bspLibLevel, 
    cfgDict['INCLUDEPY'],
    sources,
    cfgDict['LIBPL'],
    cfgDict['VERSION'], 
    cfgDict['LIBS'], 
    cfgDict['LIBM'])

print 'cmd = ', cmd 
os.system(cmd)