From 5a67bce75e87014ea80b2654ec27733eb8944871 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 13 Sep 2021 08:20:12 +0200 Subject: [PATCH] Runtime BR's are implicitly required --- conf2spec.py | 11 +++++------ tests/expected_specfiles/python-aionotion.spec | 2 -- .../expected_specfiles/python-jupyter-packaging.spec | 2 +- tests/expected_specfiles/python-markdown-it-py.spec | 2 +- tests/test_configs/pyp2spec_aioflo.conf | 1 - tests/test_configs/pyp2spec_aionotion.conf | 6 ------ tests/test_configs/pyp2spec_boutdata.conf | 2 -- tests/test_configs/pyp2spec_click.conf | 2 +- tests/test_configs/pyp2spec_jupyter-packaging.conf | 2 +- tests/test_configs/pyp2spec_tomli.conf | 1 - 10 files changed, 9 insertions(+), 22 deletions(-) diff --git a/conf2spec.py b/conf2spec.py index 52c01b9..682c126 100644 --- a/conf2spec.py +++ b/conf2spec.py @@ -10,19 +10,18 @@ TEMPLATE_PATH = Path().resolve(__file__) / 'template.spec' def generate_extra_build_requires(config): """If defined in config file, return extra build requires. - If none were defined, return an empty string.""" + If none were defined, return `-r` - runtime extra BRs`.""" - # TODO: This doesn't handle doubles like -xr + # TODO: custom tox env (-e) options = { - "test": "-t", - "runtime": "-r", + "tox": "-t", "extra": "-x", } extra_brs = config.get_list("extra_build_requires") - # No extra BuildRequires were defined - return empty string + # No extra BuildRequires were defined - return `-r` = runtime if not extra_brs: - return "" + return "-r" generated_brs = [] add = generated_brs.append diff --git a/tests/expected_specfiles/python-aionotion.spec b/tests/expected_specfiles/python-aionotion.spec index 5d30a44..cfa35ce 100644 --- a/tests/expected_specfiles/python-aionotion.spec +++ b/tests/expected_specfiles/python-aionotion.spec @@ -45,8 +45,6 @@ Summary: %{summary} %files -n python3-aionotion -f %{pyproject_files} -%doc README.md -%license LICENSE %changelog diff --git a/tests/expected_specfiles/python-jupyter-packaging.spec b/tests/expected_specfiles/python-jupyter-packaging.spec index e6aa56f..dc5769c 100644 --- a/tests/expected_specfiles/python-jupyter-packaging.spec +++ b/tests/expected_specfiles/python-jupyter-packaging.spec @@ -29,7 +29,7 @@ Summary: %{summary} %generate_buildrequires -%pyproject_buildrequires -r -x test +%pyproject_buildrequires -x test %build diff --git a/tests/expected_specfiles/python-markdown-it-py.spec b/tests/expected_specfiles/python-markdown-it-py.spec index 6a0b506..8f02549 100644 --- a/tests/expected_specfiles/python-markdown-it-py.spec +++ b/tests/expected_specfiles/python-markdown-it-py.spec @@ -36,7 +36,7 @@ Summary: %{summary} %generate_buildrequires -%pyproject_buildrequires +%pyproject_buildrequires -r %build diff --git a/tests/test_configs/pyp2spec_aioflo.conf b/tests/test_configs/pyp2spec_aioflo.conf index ec6c2d6..f086a70 100644 --- a/tests/test_configs/pyp2spec_aioflo.conf +++ b/tests/test_configs/pyp2spec_aioflo.conf @@ -20,7 +20,6 @@ manual_build_requires = [ "python3dist(pytest-cov)", ] -extra_build_requires = ["runtime"] test_method = "pytest" license_files = ["LICENSE"] doc_files = ["AUTHORS.md", "README.md"] diff --git a/tests/test_configs/pyp2spec_aionotion.conf b/tests/test_configs/pyp2spec_aionotion.conf index da6f8f5..a871622 100644 --- a/tests/test_configs/pyp2spec_aionotion.conf +++ b/tests/test_configs/pyp2spec_aionotion.conf @@ -11,11 +11,5 @@ archive_name = "aionotion" description = ''' A asyncio-friendly library for Notion Home Monitoring devices. ''' - -extra_build_requires = ["runtime"] - -license_files = ["LICENSE"] -doc_files = ["README.md"] - 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_boutdata.conf b/tests/test_configs/pyp2spec_boutdata.conf index 0292c12..c048df6 100644 --- a/tests/test_configs/pyp2spec_boutdata.conf +++ b/tests/test_configs/pyp2spec_boutdata.conf @@ -18,8 +18,6 @@ manual_build_requires = [ "python3dist(pytest)", ] -extra_build_requires = ["runtime"] - test_method = "pytest" license_files = ["LICENSE"] doc_files = ["README.md"] diff --git a/tests/test_configs/pyp2spec_click.conf b/tests/test_configs/pyp2spec_click.conf index 7590b9c..9f1e41f 100644 --- a/tests/test_configs/pyp2spec_click.conf +++ b/tests/test_configs/pyp2spec_click.conf @@ -15,7 +15,7 @@ It's the "Command Line Interface Creation Kit". It's highly configurable but\ comes with good defaults out of the box. ''' -extra_build_requires = ["test"] +extra_build_requires = ["tox"] test_method = "tox" license_files = ["LICENSE.rst"] diff --git a/tests/test_configs/pyp2spec_jupyter-packaging.conf b/tests/test_configs/pyp2spec_jupyter-packaging.conf index 991478e..9093f5e 100644 --- a/tests/test_configs/pyp2spec_jupyter-packaging.conf +++ b/tests/test_configs/pyp2spec_jupyter-packaging.conf @@ -13,7 +13,7 @@ This package contains utilities for making Python packages with and without accompanying JavaScript packages. ''' -extra_build_requires = ["runtime", "extra"] +extra_build_requires = ["extra"] extra_test_env = ["test"] test_method = "pytest" diff --git a/tests/test_configs/pyp2spec_tomli.conf b/tests/test_configs/pyp2spec_tomli.conf index e2516bb..f6bf432 100644 --- a/tests/test_configs/pyp2spec_tomli.conf +++ b/tests/test_configs/pyp2spec_tomli.conf @@ -18,7 +18,6 @@ manual_build_requires = [ "python3-dateutil", ] -extra_build_requires = ["runtime"] test_method = "pytest" license_files = ["LICENSE"]