diff --git a/conf2spec.py b/conf2spec.py index d31d04e..4c2b4c3 100644 --- a/conf2spec.py +++ b/conf2spec.py @@ -102,7 +102,7 @@ def generate_binary_files(config): """If defined in config file, return binary_files. If none were defined, return an empty string.""" - return config["files"].get("binary_files", "") + return config.get("binary_files", "") @@ -127,11 +127,11 @@ def fill_in_template(config): manual_build_requires=generate_manual_build_requires(config), extra_build_requires=generate_extra_build_requires(config), test=generate_check(config), - license_files=" ".join(config["files"]["license_files"]), - doc_files=" ".join(config["files"]["doc_files"]), + license_files=" ".join(config["license_files"]), + doc_files=" ".join(config["doc_files"]), binary_files=generate_binary_files(config), - changelog_head=config["changelog"]["changelog_head"], - changelog_msg=config["changelog"]["changelog_msg"], + changelog_head=config["changelog_head"], + changelog_msg=config["changelog_msg"], ) return result diff --git a/tests/test_configs/pyp2spec_aionotion.conf b/tests/test_configs/pyp2spec_aionotion.conf index 8aa4c1f..da6f8f5 100644 --- a/tests/test_configs/pyp2spec_aionotion.conf +++ b/tests/test_configs/pyp2spec_aionotion.conf @@ -14,10 +14,8 @@ A asyncio-friendly library for Notion Home Monitoring devices. extra_build_requires = ["runtime"] -[files] license_files = ["LICENSE"] doc_files = ["README.md"] -[changelog] changelog_head = "Fri Jun 04 2021 Package Manager " changelog_msg = "Rebuilt for Python 3.10" \ No newline at end of file diff --git a/tests/test_configs/pyp2spec_click.conf b/tests/test_configs/pyp2spec_click.conf index 0bd23b1..eaa073c 100644 --- a/tests/test_configs/pyp2spec_click.conf +++ b/tests/test_configs/pyp2spec_click.conf @@ -18,10 +18,8 @@ comes with good defaults out of the box. extra_build_requires = ["test"] test = "tox" -[files] license_files = ["LICENSE.rst"] doc_files = ["README.rst", "CHANGES.rst"] -[changelog] changelog_head = "Wed Jun 02 2021 Package Maintainer " changelog_msg = "Rebuilt for Python 3.10" \ No newline at end of file diff --git a/tests/test_configs/pyp2spec_jupyter-packaging.conf b/tests/test_configs/pyp2spec_jupyter-packaging.conf index ee91c71..b2937d6 100644 --- a/tests/test_configs/pyp2spec_jupyter-packaging.conf +++ b/tests/test_configs/pyp2spec_jupyter-packaging.conf @@ -27,10 +27,8 @@ unwanted_tests = [ "test_run", ] -[files] license_files = ["LICENSE"] doc_files = ["README.md"] -[changelog] changelog_head = "Fri Jul 23 2021 Package Maintainer " changelog_msg = "Initial package" \ No newline at end of file diff --git a/tests/test_configs/pyp2spec_markdown-it-py.conf b/tests/test_configs/pyp2spec_markdown-it-py.conf index 682ea44..7d9b20b 100644 --- a/tests/test_configs/pyp2spec_markdown-it-py.conf +++ b/tests/test_configs/pyp2spec_markdown-it-py.conf @@ -33,11 +33,9 @@ unwanted_tests = [ "test_linkify", ] -[files] license_files = ["LICENSE", "LICENSE.markdown-it"] doc_files = ["README.md"] binary_files = ["markdown-it"] -[changelog] changelog_head = "Fri Jul 23 2021 Package Maintainer " changelog_msg = "Rebuilt" \ No newline at end of file diff --git a/tests/test_configs/pyp2spec_tomli.conf b/tests/test_configs/pyp2spec_tomli.conf index 5d4cfef..c960f06 100644 --- a/tests/test_configs/pyp2spec_tomli.conf +++ b/tests/test_configs/pyp2spec_tomli.conf @@ -21,11 +21,9 @@ manual_build_requires = [ extra_build_requires = ["runtime"] test = "pytest" -[files] license_files = ["LICENSE"] doc_files = ["README.md", "CHANGELOG.md"] -[changelog] changelog_head = "Thu Jul 29 2021 Package Maintainer " changelog_msg = ''' Update to version 1.1.0