File: setup.py

package info (click to toggle)
tomopy 1.15.3%2Bds1-3
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 16,320 kB
  • sloc: cpp: 8,205; ansic: 7,231; python: 6,629; sh: 169; makefile: 70
file content (23 lines) | stat: -rw-r--r-- 496 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
#!/usr/bin/env python

import os
import sys
import shutil
import subprocess as sp

ret = 0
output = "No output generated"

try:
    cwd = os.getcwd()
    nwd = os.path.realpath(os.path.dirname(cwd))
    os.chdir(nwd)
    cmd = [sys.executable, "setup.py"] + sys.argv[1:]
    print("\nExecuting:\n\n\t'{}'\n".format(" ".join(cmd)))
    output = sp.check_output(cmd)
except Exception as e:
    print("Exception: {}".format(e))
    print("stdout:\n\n{}\n".format(output))
    ret = 1

sys.exit(ret)