Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加BSD版权选项 #155

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions cmds/cmd_package/cmd_package_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from string import Template
from .cmd_package_utils import user_input


def package_wizard():
"""Packages creation wizard.
Expand Down Expand Up @@ -103,15 +102,15 @@ def package_wizard():
author_email = user_input()

# sixth step
print('\033[5;33;40m\n6.Please choose a license of this package from 1 to 4, or input other license name :\033[0m')
print("\033[1;32;40m[1:Apache-2.0]|[2:MIT]|[3:LGPL-2.1]|[4:GPL-2.0]\033[0m")
license_index = ('Apache-2.0', 'MIT', 'LGPL-2.1', 'GPL-2.0')
print('\033[5;33;40m\n6.Please choose a license of this package from 1 to 5, or input other license name :\033[0m')
print("\033[1;32;40m[1:Apache-2.0]|[2:MIT]|[3:LGPL-2.1]|[4:GPL-2.0][5:BSD-3-Clause]\033[0m")
license_index = ('Apache-2.0', 'MIT', 'LGPL-2.1', 'GPL-2.0', 'BSD-3-Clause')
license_class = user_input()
while license_class == '':
print('\033[1;31;40mError: you must choose or input a license of this package. Try again.\033[0m')
license_class = user_input()

if license_class.isdigit() and 1 <= int(license_class) <= 4:
if license_class.isdigit() and 1 <= int(license_class) <= 5:
license_choice = license_index[int(license_class) - 1]
else:
license_choice = license_class
Expand Down Expand Up @@ -152,4 +151,3 @@ def package_wizard():
print('\nThe package index has been created \033[1;32;40msuccessfully\033[0m.')
print('Please \033[5;34;40mupdate\033[0m other information of this package '
'based on Kconfig and package.json in directory ' + name + '.')