File: compile.py

package info (click to toggle)
python-scientific 2.2-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,368 kB
  • ctags: 2,396
  • sloc: python: 6,468; ansic: 3,643; xml: 3,596; makefile: 79; sh: 27
file content (21 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Compilation script

import Scientific.Installation
import os, sys

# Find the Python library path
lib = os.path.join(os.path.join(sys.exec_prefix, 'lib'),
                   'python'+sys.version[:3])

# Construct the final Setup file
os.system("sed -e s+@SCIENTIFIC@+" + Scientific.Installation.include_path +
          "+g < Setup.template > Setup")

# Get a copy of Makefile.pre.in and make the Makefile
source = os.path.join(os.path.join(lib, 'config'), 'Makefile.pre.in')
if os.path.exists(source):
    os.system('cp ' + source + ' .')
os.system("make -f Makefile.pre.in boot")

# Compile the module(s).
os.system("make")