From 6f125fe3440ba6150339effb2400a1622b997e96 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Mon, 23 Aug 2021 17:43:50 +0200 Subject: [PATCH] Add test package with `extra` BR and unwanted tests in %check - Change extra_build_requires to list as it's possible to define more than 1. --- tests/pyp2spec_click/pyp2spec_click.conf | 2 +- .../pyp2spec_jupyter-packaging.conf | 35 +++++++++++ .../pyp2spec_jupyter-packaging.spec | 61 +++++++++++++++++++ tests/pyp2spec_tomli/pyp2spec_tomli.conf | 2 +- 4 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.conf create mode 100644 tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.spec diff --git a/tests/pyp2spec_click/pyp2spec_click.conf b/tests/pyp2spec_click/pyp2spec_click.conf index ccbfe15..dfd9018 100644 --- a/tests/pyp2spec_click/pyp2spec_click.conf +++ b/tests/pyp2spec_click/pyp2spec_click.conf @@ -14,7 +14,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 = ["test"] test = "tox" [files] diff --git a/tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.conf b/tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.conf new file mode 100644 index 0000000..6e56cbe --- /dev/null +++ b/tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.conf @@ -0,0 +1,35 @@ +name = "jupyter-packaging" +python_name = "python-jupyter-packaging" +module_name = "jupyter_packaging" +version = "0.10.4" +release = "2" +summary = "Tools to help build and install Jupyter Python packages" +license = "BSD" +url = "https://github.com/jupyter/jupyter-packaging" +source = "%{pypi_source}" +description = ''' +This package contains utilities for making Python packages with and without +accompanying JavaScript packages. +''' + +extra_build_requires = ["runtime", "extra"] +extra_test_env = ["test"] + +test = "pytest" +unwanted_tests = [ + "test_build_package", + "test_create_cmdclass", + "test_deprecated_metadata", + "test_develop", + "test_install", + "test_install_hybrid", + "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/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.spec b/tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.spec new file mode 100644 index 0000000..a718e5d --- /dev/null +++ b/tests/pyp2spec_jupyter-packaging/pyp2spec_jupyter-packaging.spec @@ -0,0 +1,61 @@ +Name: python-jupyter-packaging +Version: 0.10.4 +Release: 2%{?dist} +Summary: Tools to help build and install Jupyter Python packages + +License: BSD +URL: https://github.com/jupyter/jupyter-packaging +Source0: %{pypi_source} + +BuildArch: noarch +BuildRequires: python3-devel + +%global _description %{expand: +This package contains utilities for making Python packages with and without +accompanying JavaScript packages. +} + + +%description %_description + +%package -n python3-jupyter-packaging +Summary: %{summary} + +%description -n python3-jupyter-packaging %_description + + +%prep +%autosetup -p1 -n jupyter_packaging-%{version} + + +%generate_buildrequires +%pyproject_buildrequires -r -x test + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files jupyter_packaging + + +%check +%pytest -k "not test_build_package and \ +not test_create_cmdclass and \ +not test_deprecated_metadata and \ +not test_develop and \ +not test_install and \ +not test_install_hybrid and \ +not test_run" + + +%files -n python3-jupyter-packaging -f %{pyproject_files} +%doc README.md +%license LICENSE + + +%changelog +* Fri Jul 23 2021 Package Maintainer - 0.10.4-2 +- Initial package \ No newline at end of file diff --git a/tests/pyp2spec_tomli/pyp2spec_tomli.conf b/tests/pyp2spec_tomli/pyp2spec_tomli.conf index 9cee52d..5266d45 100644 --- a/tests/pyp2spec_tomli/pyp2spec_tomli.conf +++ b/tests/pyp2spec_tomli/pyp2spec_tomli.conf @@ -17,7 +17,7 @@ manual_build_requires = [ "python3-dateutil", ] -extra_build_requires = "runtime" +extra_build_requires = ["runtime"] test = "pytest" [files]