-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathargs.py
40 lines (37 loc) · 1.14 KB
/
args.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
# Copyright Christopher Di Bella
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See /LICENCE for licence information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import argparse
import sys
def parse_args():
parser = argparse.ArgumentParser(prog=sys.argv[0],
description='Generates a new C++ project')
parser.add_argument(
'path',
help='A path to the project directory. Created if absent.',
)
parser.add_argument(
'--author',
required=True,
help='The entity who owns the copyright.',
)
parser.add_argument(
'--remote',
type=str,
help='A remote that the repo can be uploaded to by default',
default='')
parser.add_argument(
'--package-manager',
type=str,
choices=['none', 'vcpkg'],
help='Specifies the package manager to use',
default='none',
)
parser.add_argument(
'--package-manager-remote',
type=str,
help='A remote that the package manager can be acquired from',
default='',
)
return parser.parse_args()