File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed
Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ import argparse
2+
3+
4+ def init_project (args ):
5+ """
6+ Initialize a new PythonNative project.
7+ """
8+ # TODO: Implementation
9+
10+
11+ def run_project (args ):
12+ """
13+ Run the specified project.
14+ """
15+ # TODO: Implementation
16+
17+
18+ def clean_project (args ):
19+ """
20+ Clean the specified project.
21+ """
22+ # TODO: Implementation
23+
24+
25+ def main ():
26+ parser = argparse .ArgumentParser (prog = "pn" , description = "PythonNative CLI" )
27+ subparsers = parser .add_subparsers ()
28+
29+ # Create a new command 'init' that calls init_project
30+ parser_init = subparsers .add_parser ("init" )
31+ parser_init .set_defaults (func = init_project )
32+
33+ # Create a new command 'run' that calls run_project
34+ parser_run = subparsers .add_parser ("run" )
35+ parser_run .add_argument ("platform" , choices = ["android" , "ios" ])
36+ parser_run .set_defaults (func = run_project )
37+
38+ # Create a new command 'clean' that calls clean_project
39+ parser_clean = subparsers .add_parser ("clean" )
40+ parser_clean .set_defaults (func = clean_project )
41+
42+ args = parser .parse_args ()
43+ args .func (args )
Original file line number Diff line number Diff line change 2020 "rubicon-objc>=0.4.6,<0.5.0" ,
2121 # Add more requirements here as necessary
2222 ],
23+ entry_points = {
24+ "console_scripts" : [
25+ "pn=cli.pn:main" ,
26+ ],
27+ },
2328)
You can’t perform that action at this time.
0 commit comments