1- %{! ?python3_pkgversion: %global python3_pkgversion 3}
2- %{! ?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3- %{! ?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
4- %{! ?__python3: %global __python3 /usr/bin/python3}
5- %{! ?py3_build: %define py3_build CFLAGS= "%{optflags }" %{__python3} setup.py build}
6- %{! ?py3_install: %define py3_install %{__python3} setup.py install --skip-build --root %{buildroot }}
7-
81%global pypi_name pytest-subtests
92
10- Summary: Support for unittest subTest() and subtests fixture
113Name: python-%{pypi_name }
12- Version: 0.3 .1
4+ Version: 0.12 .1
135Release: 4%{?dist }
6+ Summary: Support for unittest subTest() and subtests fixture
7+
8+ # SPDX
149License: MIT
10+ Vendor: Microsoft Corporation
11+ Distribution: Azure Linux
1512URL: https://github.com/pytest-dev/pytest-subtests
16- #Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17- Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name }/%{name }-%{version }.tar.gz
13+ Source0: https://files.pythonhosted.org/packages/source/p/pytest-subtests/pytest-subtests-0.12.1.tar.gz#/%{name}-%{version}.tar.gz
1814BuildArch: noarch
19- %if 0%{?with_check }
20- BuildRequires: python3-pip
21- %endif
2215
2316%description
2417pytest-subtests unittest subTest() support and subtests fixture.
@@ -27,43 +20,95 @@ pytest-subtests unittest subTest() support and subtests fixture.
2720Summary: %{summary }
2821
2922BuildRequires: python3-devel
30- BuildRequires: python3-setuptools
31- BuildRequires: python3-setuptools_scm
23+ BuildRequires: python3dist(pytest)
24+ BuildRequires: python3-wheel
25+ BuildRequires: python3-pip
26+ BuildRequires: python3-setuptools_scm
27+
3228%{?python_provide:%python_provide python3-%{pypi_name }}
3329
3430%description -n python3-%{pypi_name }
3531pytest-subtests unittest subTest() support and subtests fixture.
3632
3733%prep
3834%autosetup -n %{pypi_name }-%{version }
39- rm -rf %{pypi_name }.egg-info
35+
36+ %generate_buildrequires
37+ %pyproject_buildrequires -r
4038
4139%build
42- %py3_build
40+ %pyproject_wheel
4341
4442%install
45- %py3_install
43+ %pyproject_install
44+ %pyproject_save_files pytest_subtests
4645
4746%check
48- pip3 install pytest==7.1.2
4947# https://github.com/pytest-dev/pytest-subtests/issues/21
50- PYTHONDONTWRITEBYTECODE=1 pytest -v tests \
48+ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=%{buildroot }%{python3_sitelib } \
49+ %{python3 } -m pytest -v tests \
5150 -k " not TestFixture and not TestCapture and not test_simple_terminal"
5251
53- %files -n python3-%{pypi_name }
52+ %files -n python3-%{pypi_name } -f %{pyproject_files }
53+ %doc CHANGELOG.rst README.rst
5454%license LICENSE
55- %doc README.rst
56- %{python3_sitelib }/__pycache__/*
57- %{python3_sitelib }/pytest_subtests.py
58- %{python3_sitelib }/pytest_subtests-%{version }-py* .egg-info/
5955
6056%changelog
61- * Thu Apr 29 2022 Muhammad Falak <mwani @microsoft.com> - 0.3 .1-4
62- - Drop BR on pytest & pip install latest deps to enable ptest
57+ * Thu Feb 20 2025 Akhila Guruju <v-guakhila @microsoft.com> - 0.12 .1-4
58+ - Initial Azure Linux import from Fedora 41 (license: MIT).
6359- License verified
60+ - Added `BuildRequires: python3-setuptools_scm` to fix build
61+
62+ * Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-3
63+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
64+
65+ * Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.12.1-2
66+ - Rebuilt for Python 3.13
67+
68+ * Mon Apr 08 2024 Fabian Affolter <mail@fabian-affolter.ch> - 0.12.1
69+ - Update to latest upstream release (closes rhbz#2196751, closes rhbz#2203842)
70+
71+ * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-5
72+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
73+
74+ * Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-4
75+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
76+
77+ * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-3
78+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
79+
80+ * Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.10.0-2
81+ - Rebuilt for Python 3.12
82+
83+ * Mon Mar 27 2023 Christian Heimes <cheimes@redhat.com> - 0.10.0-1
84+ - Update to 0.10.0
85+
86+ * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-5
87+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
88+
89+ * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4
90+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
91+
92+ * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.5.0-3
93+ - Rebuilt for Python 3.11
94+
95+ * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-2
96+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
97+
98+ * Wed Aug 25 2021 Fabian Affolter <mail@fabian-affolter.ch> - 0.5.0-1
99+ - Update to latest upstream release 0.5.0
100+
101+ * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-3
102+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
103+
104+ * Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 0.4.0-2
105+ - Rebuilt for Python 3.10
106+
107+ * Sun Feb 07 2021 Christian Heimes <cheimes@redhat.com> - 0.4.0-1
108+ - Update to 0.4 (#1925972)
64109
65- * Wed Dec 09 2020 Steve Laughman <steve.laughman@microsoft.com > - 0.3.1-3
66- - Initial CBL-Mariner import from Fedora 33 (license: MIT)
110+ * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org > - 0.3.1-3
111+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
67112
68113* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-2
69114- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0 commit comments