-
Notifications
You must be signed in to change notification settings - Fork 1
/
_Build.py
57 lines (45 loc) · 1.66 KB
/
_Build.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
##==============================================================#
## SECTION: Imports #
##==============================================================#
import os.path as op
from xml.etree import ElementTree
import auxly
import auxly.filesys as fsys
from auxly import shell
from ubuild import main, menu
from qprompt import Menu
##==============================================================#
## SECTION: Function Definitions #
##==============================================================#
@menu
def cleanup():
with fsys.Cwd("app"):
shell.call("_Cleanup.py")
@menu("v")
def check_version():
with fsys.Cwd(".", __file__):
shell.call("_Check_Versions.py")
@menu("t")
def run_tests():
with fsys.Cwd("tests", __file__):
shell.call("_Run_Tests.py")
@menu
def package_menu():
Menu(install_package_locally, upload_to_pypi).main(header="Package")
@menu
def browse_menu():
def github(): auxly.open("https://github.com/jeffrimko/PopPage")
def pypi(): auxly.open("https://pypi.org/project/PopPage/")
def travis(): auxly.open("https://travis-ci.org/jeffrimko/PopPage")
Menu(github, pypi, travis).main(header="Browse")
def install_package_locally():
with fsys.Cwd("app", __file__):
shell.call("_Install_Package.py")
def upload_to_pypi():
with fsys.Cwd("app", __file__):
shell.call("_Upload_PyPI.py")
##==============================================================#
## SECTION: Main Body #
##==============================================================#
if __name__ == '__main__':
main()