-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfips
More file actions
executable file
·24 lines (21 loc) · 831 Bytes
/
fips
File metadata and controls
executable file
·24 lines (21 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
"""fips main entry"""
import os
import sys
import subprocess
fips_github_url = 'https://github.com/MODit3D/fips.git'
# fips_github_url = 'https://github.com/floooh/fips.git'
proj_path = os.path.dirname(os.path.abspath(__file__))
# use FIPS_ROOT if availabe in user's environment
fips_root = os.environ.get('FIPS_ROOT') or os.path.dirname(proj_path)
fips_path = fips_root + '/fips'
if not os.path.isdir(fips_path) :
print("\033[93m=== cloning fips build system to '{}':\033[0m".format(fips_path))
subprocess.call(['git', 'clone', fips_github_url, fips_path])
sys.path.insert(0,fips_path)
try :
from mod import fips
except ImportError :
print("\033[91m[ERROR]\033[0m failed to initialize fips build system in '{}'".format(proj_path))
sys.exit(10)
fips.run(fips_path, proj_path, sys.argv)