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.
This commit is contained in:
Karolina Surma
2021-08-23 17:46:13 +02:00
parent cca01faed1
commit 6f125fe344
4 changed files with 98 additions and 2 deletions
+1 -1
View File
@@ -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]
@@ -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 <package@maintainer.com>"
changelog_msg = "Initial package"
@@ -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 <package@maintainer.com> - 0.10.4-2
- Initial package
+1 -1
View File
@@ -17,7 +17,7 @@ manual_build_requires = [
"python3-dateutil",
]
extra_build_requires = "runtime"
extra_build_requires = ["runtime"]
test = "pytest"
[files]