diff --git a/conf2spec.py b/conf2spec.py index 682c126..e5f9afc 100644 --- a/conf2spec.py +++ b/conf2spec.py @@ -49,7 +49,8 @@ def generate_check(config): # If no tests were defined, run at least smoke import check # This is mandatory as defined in Fedora Packaging Guidelines # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests - return f"%py3_check_import {config.get_string('module_name')}" + modules = " ".join(config.get_list("modules")) + return f"%py3_check_import {modules}" def generate_pytest(config): @@ -100,7 +101,7 @@ def fill_in_template(config): license_files=" ".join(config.get_list("license_files")), license=config.get_string("license"), manual_build_requires=config.get_list("manual_build_requires"), - module_name=config.get_string("module_name"), + modules=" ".join(config.get_list("modules")), name=config.get_string("pypi_name"), python_name=config.get_string("python_name"), release=config.get_string("release"), diff --git a/template.spec b/template.spec index 98106da..6ed1dc7 100644 --- a/template.spec +++ b/template.spec @@ -40,7 +40,7 @@ Summary: %{summary} %install %pyproject_install -%pyproject_save_files {{module_name}} +%pyproject_save_files {{modules}} %check diff --git a/tests/test_configs/pyp2spec_aioflo.conf b/tests/test_configs/pyp2spec_aioflo.conf index f086a70..63ed52c 100644 --- a/tests/test_configs/pyp2spec_aioflo.conf +++ b/tests/test_configs/pyp2spec_aioflo.conf @@ -1,6 +1,6 @@ pypi_name = "aioflo" python_name = "python-aioflo" -module_name = "aioflo" +modules = ["aioflo"] version = "0.4.2" release = "4" summary = "Python library for Flo by Moen Smart Water Detectors" diff --git a/tests/test_configs/pyp2spec_aionotion.conf b/tests/test_configs/pyp2spec_aionotion.conf index a871622..218d0c3 100644 --- a/tests/test_configs/pyp2spec_aionotion.conf +++ b/tests/test_configs/pyp2spec_aionotion.conf @@ -1,6 +1,6 @@ pypi_name = "aionotion" python_name = "python-aionotion" -module_name = "aionotion" +modules = ["aionotion"] version = "2.0.3" release = "4" summary = "Python library for Notion Home Monitoring" diff --git a/tests/test_configs/pyp2spec_boutdata.conf b/tests/test_configs/pyp2spec_boutdata.conf index c048df6..4cc24f1 100644 --- a/tests/test_configs/pyp2spec_boutdata.conf +++ b/tests/test_configs/pyp2spec_boutdata.conf @@ -1,6 +1,6 @@ pypi_name = "boutdata" python_name = "python-boutdata" -module_name = "boutdata" +modules = ["boutdata"] version = "0.1.3" release = "0.2" summary = "Python package for collecting BOUT++ data" diff --git a/tests/test_configs/pyp2spec_click.conf b/tests/test_configs/pyp2spec_click.conf index 9f1e41f..651eade 100644 --- a/tests/test_configs/pyp2spec_click.conf +++ b/tests/test_configs/pyp2spec_click.conf @@ -1,6 +1,6 @@ pypi_name = "click" python_name = "python-click" -module_name = "click" +modules = ["click"] version = "7.1.2" release = "6" summary = "Simple wrapper around optparse for powerful command line utilities" diff --git a/tests/test_configs/pyp2spec_jupyter-packaging.conf b/tests/test_configs/pyp2spec_jupyter-packaging.conf index 9093f5e..2cb35e3 100644 --- a/tests/test_configs/pyp2spec_jupyter-packaging.conf +++ b/tests/test_configs/pyp2spec_jupyter-packaging.conf @@ -1,6 +1,6 @@ pypi_name = "jupyter-packaging" python_name = "python-jupyter-packaging" -module_name = "jupyter_packaging" +modules = ["jupyter_packaging"] version = "0.10.4" release = "2" summary = "Tools to help build and install Jupyter Python packages" diff --git a/tests/test_configs/pyp2spec_markdown-it-py.conf b/tests/test_configs/pyp2spec_markdown-it-py.conf index e3032cc..ffdc2fd 100644 --- a/tests/test_configs/pyp2spec_markdown-it-py.conf +++ b/tests/test_configs/pyp2spec_markdown-it-py.conf @@ -1,6 +1,6 @@ pypi_name = "markdown-it-py" python_name = "python-markdown-it-py" -module_name = "markdown_it" +modules = ["markdown_it"] version = "1.1.0" release = "3" summary = "Python port of markdown-it" diff --git a/tests/test_configs/pyp2spec_tomli.conf b/tests/test_configs/pyp2spec_tomli.conf index f6bf432..4ec6fbe 100644 --- a/tests/test_configs/pyp2spec_tomli.conf +++ b/tests/test_configs/pyp2spec_tomli.conf @@ -1,6 +1,6 @@ pypi_name = "tomli" python_name = "python-tomli" -module_name = "tomli" +modules = ["tomli"] version = "1.1.0" release = "1" summary = "A little TOML parser for Python"