diff --git a/cookiecutter.json b/cookiecutter.json index e0e2f24..923798c 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -26,10 +26,8 @@ ], "app_source": "", "app_start_source": "", - "pyproject_table_briefcase_additional": "", - "pyproject_table_briefcase_app_additional": "", - "pyproject_requires": "", - "pyproject_test_requires": "", + "pyproject_table_briefcase_extra_content": "", + "pyproject_table_briefcase_app_extra_content": "", "pyproject_table_macOS": "", "pyproject_table_linux": "", "pyproject_table_linux_system_debian": "", diff --git a/tests/test_app_template.py b/tests/test_app_template.py index baf2d4b..a254801 100644 --- a/tests/test_app_template.py +++ b/tests/test_app_template.py @@ -74,13 +74,8 @@ def main(): "tests", ] -requires = [ -] -test_requires = [ -] - ''', - id="minimum context", + id="minimum-context", ), pytest.param( { @@ -89,12 +84,6 @@ def main(): test_framework="unittest", app_source=APP_SOURCE, app_start_source=APP_START_SOURCE, - pyproject_requires=""" - "pyproject_requires" -""", - pyproject_test_requires=""" - "pyproject_test_requires" -""", pyproject_table_macOS=SIMPLE_TABLE_CONTENT.format("macOS"), pyproject_table_linux=SIMPLE_TABLE_CONTENT.format("linux"), pyproject_table_linux_system_debian=SIMPLE_TABLE_CONTENT.format("deb"), @@ -136,13 +125,6 @@ def main(): "tests", ] -requires = [ - "pyproject_requires" -] -test_requires = [ - "pyproject_test_requires" -] - [tool.briefcase.app.helloworld.macOS] requires = [ "macOS==1.1.0", @@ -206,7 +188,7 @@ def main(): ] ''', - id="normal context", + id="normal-context", ), pytest.param( { @@ -214,23 +196,17 @@ def main(): **dict( app_source=APP_SOURCE, app_start_source=APP_START_SOURCE, - pyproject_table_briefcase_additional=""" -field = "pyproject_table_briefcase_additional" + pyproject_table_briefcase_extra_content=""" +field = "pyproject_table_briefcase_extra_content" answer = 42 """, - pyproject_table_briefcase_app_additional=""" + pyproject_table_briefcase_app_extra_content=""" other_resources = [ "dir", "otherdir", - "pyproject_table_briefcase_app_additional", + "pyproject_table_briefcase_app_extra_content", ]""", - pyproject_requires=""" - "pyproject_requires" -""", - pyproject_test_requires=""" - "pyproject_test_requires" -""", pyproject_table_macOS=SIMPLE_TABLE_CONTENT.format("macOS"), pyproject_table_linux=SIMPLE_TABLE_CONTENT.format("linux"), pyproject_table_linux_appimage=SIMPLE_TABLE_CONTENT.format("appimage"), @@ -265,7 +241,7 @@ def main(): license = "BSD license" author = "Jane Developer" author_email = "jane@example.com" -field = "pyproject_table_briefcase_additional" +field = "pyproject_table_briefcase_extra_content" answer = 42 [tool.briefcase.app.helloworld] @@ -281,17 +257,10 @@ def main(): "tests", ] -requires = [ - "pyproject_requires" -] -test_requires = [ - "pyproject_test_requires" -] - other_resources = [ "dir", "otherdir", - "pyproject_table_briefcase_app_additional", + "pyproject_table_briefcase_app_extra_content", ] [tool.briefcase.app.helloworld.macOS] @@ -341,7 +310,7 @@ def main(): "value", ] ''', - id="normal context with extra content", + id="normal-context-with-extra-content", ), pytest.param( { @@ -349,9 +318,9 @@ def main(): **dict( app_source=APP_SOURCE, app_start_source=APP_START_SOURCE, - pyproject_table_briefcase_additional='\nfield = "pyproject_table_briefcase_additional"', - pyproject_table_briefcase_app_additional=""" -other_resources = ["dir", "pyproject_table_briefcase_app_additional"] + pyproject_table_briefcase_extra_content='\nfield = "pyproject_table_briefcase_extra_content"', + pyproject_table_briefcase_app_extra_content=""" +other_resources = ["dir", "pyproject_table_briefcase_app_extra_content"] """, pyproject_requires=""" "pyproject_requires" @@ -381,7 +350,7 @@ def main(): license = "BSD license" author = "Jane Developer" author_email = "jane@example.com" -field = "pyproject_table_briefcase_additional" +field = "pyproject_table_briefcase_extra_content" [tool.briefcase.app.helloworld] formal_name = "Hello World" @@ -395,14 +364,7 @@ def main(): test_sources = [ "tests", ] - -requires = [ - "pyproject_requires" -] -test_requires = [ - "pyproject_test_requires" -] -other_resources = ["dir", "pyproject_table_briefcase_app_additional"] +other_resources = ["dir", "pyproject_table_briefcase_app_extra_content"] [tool.briefcase.helloworld.my_custom_format_one] field = "pyproject_extra_content_one" @@ -410,7 +372,7 @@ def main(): [tool.briefcase.helloworld.my_custom_format_two] field = "pyproject_extra_content_two" ''', - id="only extra content", + id="only-extra-content", ), ] diff --git a/{{ cookiecutter.app_name }}/pyproject.toml b/{{ cookiecutter.app_name }}/pyproject.toml index 15ba598..d741779 100644 --- a/{{ cookiecutter.app_name }}/pyproject.toml +++ b/{{ cookiecutter.app_name }}/pyproject.toml @@ -7,7 +7,7 @@ url = "{{ cookiecutter.url }}" license = "{{ cookiecutter.license }}" author = "{{ cookiecutter.author }}" author_email = "{{ cookiecutter.author_email }}" -{{- cookiecutter.pyproject_table_briefcase_additional }} +{{- cookiecutter.pyproject_table_briefcase_extra_content }} [tool.briefcase.app.{{ cookiecutter.app_name|escape_non_ascii }}] formal_name = "{{ cookiecutter.formal_name|escape_toml }}" @@ -21,14 +21,7 @@ sources = [ test_sources = [ "tests", ] - -requires = [ -{{- cookiecutter.pyproject_requires }} -] -test_requires = [ -{{- cookiecutter.pyproject_test_requires }} -] -{{- cookiecutter.pyproject_table_briefcase_app_additional }} +{{- cookiecutter.pyproject_table_briefcase_app_extra_content }} {% if cookiecutter.pyproject_table_macOS %} [tool.briefcase.app.{{ cookiecutter.app_name|escape_non_ascii }}.macOS]