Skip to content
Draft
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"GPL-2.0+",
"GPL-3.0",
"GPL-3.0+",
"Proprietary",
"Other"
"Proprietary"
],
"test_framework": [
"pytest",
Expand Down
41 changes: 37 additions & 4 deletions tests/test_app_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def main():
bundle = "com.example"
version = "0.0.1"
url = "https://example.com"
license.file = "LICENSE"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
author = "Jane Developer"
author_email = "jane@example.com"

Expand Down Expand Up @@ -107,7 +108,8 @@ def main():
bundle = "com.example"
version = "0.0.1"
url = "https://example.com"
license.file = "LICENSE"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
author = "Jane Developer"
author_email = "jane@example.com"

Expand Down Expand Up @@ -236,7 +238,8 @@ def main():
bundle = "com.example"
version = "0.0.1"
url = "https://example.com"
license.file = "LICENSE"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
author = "Jane Developer"
author_email = "jane@example.com"

Expand Down Expand Up @@ -340,7 +343,8 @@ def main():
bundle = "com.example"
version = "0.0.1"
url = "https://example.com"
license.file = "LICENSE"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
author = "Jane Developer"
author_email = "jane@example.com"
field = "pyproject_table_briefcase_extra_content"
Expand Down Expand Up @@ -368,6 +372,35 @@ def main():
''', # noqa: E501
id="only-extra-content",
),
pytest.param(
{**BASIC_APP_CONTEXT, "license": "Proprietary"},
'''\
# This project was generated with Unknown using template: Not provided @ Not provided
[tool.briefcase]
project_name = "Project Awesome"
bundle = "com.example"
version = "0.0.1"
url = "https://example.com"
license = "LicenseRef-Proprietary"
license-files = ["LICENSE"]
author = "Jane Developer"
author_email = "jane@example.com"

[tool.briefcase.app.helloworld]
formal_name = "Hello World"
description = "An app that does lots of stuff"
long_description = """More details about the app should go here.
"""
sources = [
"src/helloworld",
]
test_sources = [
"tests",
]

''',
id="proprietary-license",
),
]


Expand Down
7 changes: 6 additions & 1 deletion {{ cookiecutter.app_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ project_name = "{{ cookiecutter.project_name|escape_toml }}"
bundle = "{{ cookiecutter.bundle }}"
version = "0.0.1"
url = "{{ cookiecutter.url }}"
license.file = "LICENSE"
{% if cookiecutter.license == "Proprietary" %}
license = "LicenseRef-Proprietary"
{% else %}
license = "{{ cookiecutter.license }}"
{% endif %}
license-files = ["LICENSE"]
author = "{{ cookiecutter.author|escape_toml }}"
author_email = "{{ cookiecutter.author_email }}"
{{ cookiecutter.pyproject_table_briefcase_extra_content }}
Expand Down
Loading