updates
This commit is contained in:
parent
312b272fd0
commit
1ef6478501
1 changed files with 37 additions and 8 deletions
45
pybuild.py
45
pybuild.py
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
|
|
||||||
|
|
@ -15,6 +16,28 @@ parser.add_option('-t', '--distro', dest='distro', default='win')
|
||||||
|
|
||||||
options, remainder = parser.parse_args()
|
options, remainder = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
#print("[debug] ----------")
|
||||||
|
#print("[debug] --cross = ", options.cross_compile)
|
||||||
|
#print("[debug] --src = ", options.src)
|
||||||
|
#print("[debug] --distro = ", options.distro)
|
||||||
|
#print("[debug] ----------")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def enter_srcdir():
|
||||||
|
pass
|
||||||
|
def leave_srcdir():
|
||||||
|
pass
|
||||||
|
def exec(cmd):
|
||||||
|
# print command on stdout and sys.exit(1) on errors
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,14 +49,22 @@ def execute_extract():
|
||||||
def execute_lw_do_patches():
|
def execute_lw_do_patches():
|
||||||
print("[debug] doing target -> lw_do_patches")
|
print("[debug] doing target -> lw_do_patches")
|
||||||
def execute_build():
|
def execute_build():
|
||||||
print("[debug] doing target -> build")
|
enter_srcdir()
|
||||||
|
cmd = "./mach build"
|
||||||
|
exec(cmd)
|
||||||
|
leave_srcdir()
|
||||||
def execute_lw_post_build():
|
def execute_lw_post_build():
|
||||||
print("[debug] doing target -> lw_post_build")
|
print("[debug] doing target -> lw_post_build")
|
||||||
def execute_package():
|
def execute_package():
|
||||||
print("[debug] doing target -> package")
|
enter_srcdir()
|
||||||
|
cmd = "./mach package"
|
||||||
|
exec(cmd)
|
||||||
|
leave_srcdir()
|
||||||
def execute_lw_artifacts():
|
def execute_lw_artifacts():
|
||||||
print("[debug] doing target -> lw_artifacts")
|
print("[debug] doing target -> lw_artifacts")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Main targets:
|
# Main targets:
|
||||||
def execute_all():
|
def execute_all():
|
||||||
execute_fetch()
|
execute_fetch()
|
||||||
|
|
@ -45,6 +76,10 @@ def execute_all():
|
||||||
execute_lw_artifacts()
|
execute_lw_artifacts()
|
||||||
def execute_clean():
|
def execute_clean():
|
||||||
print("[debug] doing target -> clean")
|
print("[debug] doing target -> clean")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Utilities:
|
# Utilities:
|
||||||
def execute_git_subs():
|
def execute_git_subs():
|
||||||
|
|
@ -80,12 +115,6 @@ if len(remainder)>0:
|
||||||
if not options.distro in ['deb','rpm', 'win']:
|
if not options.distro in ['deb','rpm', 'win']:
|
||||||
print("error: option --distro invalid value")
|
print("error: option --distro invalid value")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
print("[debug] ----------")
|
|
||||||
print("[debug] --cross = ", options.cross_compile)
|
|
||||||
print("[debug] --src = ", options.src)
|
|
||||||
print("[debug] --distro = ", options.distro)
|
|
||||||
print("[debug] ----------")
|
|
||||||
|
|
||||||
for arg in remainder:
|
for arg in remainder:
|
||||||
if arg == 'all':
|
if arg == 'all':
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue