Skip to content

Commit 2cbb172

Browse files
authored
Upgrade python-testtools and python-fixtures (microsoft#14678)
1 parent 13f5368 commit 2cbb172

File tree

8 files changed

+339
-425
lines changed

8 files changed

+339
-425
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"fixtures-3.0.0.tar.gz": "fcf0d60234f1544da717a9738325812de1f42c2fa085e2d9252d8fff5712b2ef"
3+
"fixtures-4.0.1.tar.gz": "d2758826400d095b79666cf93a32a84f50ff8cd179831927efb48cd1e3ca7466"
44
}
55
}

SPECS-EXTENDED/python-fixtures/python-fixtures.spec

Lines changed: 137 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,76 +2,171 @@ Vendor: Microsoft Corporation
22
Distribution: Azure Linux
33
%global pypi_name fixtures
44

5+
# fixtures has a circular dependency with testtools
6+
%bcond_with bootstrap
57
%bcond_without tests
68

79
Name: python-%{pypi_name}
8-
Version: 3.0.0
9-
Release: 18%{?dist}
10+
Version: 4.0.1
11+
Release: 11%{?dist}
1012
Summary: Fixtures, reusable state for writing clean tests and more
1113

12-
License: ASL 2.0 or BSD
13-
URL: https://launchpad.net/python-fixtures
14-
Source0: http://pypi.python.org/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
14+
License: Apache-2.0 OR BSD-3-Clause
15+
URL: https://github.com/testing-cabal/fixtures
16+
Source: https://files.pythonhosted.org/packages/3c/3d/f106b3278ba50067e9cd397f836d33d141aa790853152dbb3512aaee19f3/%{pypi_name}-%{version}.tar.gz
1517
BuildArch: noarch
18+
BuildRequires: python3-pip
19+
BuildRequires: python3dist(wheel)
20+
BuildRequires: python3-pbr
1621

22+
%if %{with tests}
23+
BuildRequires: python3-tox
24+
BuildRequires: python3-pluggy
25+
BuildRequires: python3-py
26+
BuildRequires: python3-filelock
27+
BuildRequires: python3-toml
28+
BuildRequires: python3-six
29+
BuildRequires: python3-colorama
30+
BuildRequires: python3-chardet
31+
BuildRequires: python3-platformdirs
32+
BuildRequires: python3-testtools
33+
BuildRequires: python3-tox-current-env
34+
%endif
1735

18-
%global _description\
19-
Fixtures defines a Python contract for reusable state / support logic,\
20-
primarily for unit testing. Helper and adaption logic is included to\
21-
make it easy to write your own fixtures using the fixtures contract.\
22-
Glue code is provided that makes using fixtures that meet the Fixtures\
23-
contract in unit test compatible test cases easy and straight forward.
36+
%global _description %{expand:
37+
Fixtures defines a Python contract for reusable state / support logic,
38+
primarily for unit testing. Helper and adaption logic is included to make it
39+
easy to write your own fixtures using the fixtures contract. Glue code is
40+
provided that makes using fixtures that meet the Fixtures contract in unittest
41+
compatible test cases easy and straight forward.}
2442

25-
%description %_description
43+
%description %{_description}
2644

2745

28-
%package -n python3-%{pypi_name}
29-
Summary: Fixtures, reusable state for writing clean tests and more
30-
BuildArch: noarch
46+
%package -n python%{python3_pkgversion}-%{pypi_name}
47+
Summary: %{summary}
48+
BuildRequires: python%{python3_pkgversion}-devel
3149

32-
BuildRequires: python3-devel
33-
BuildRequires: python3-pbr >= 0.11
50+
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
3451

35-
%if %{with tests}
36-
BuildRequires: python3-mock
37-
BuildRequires: python3-testtools >= 0.9.22
52+
%if %{without bootstrap}
53+
%pyproject_extras_subpkg -n python%{python3_pkgversion}-%{pypi_name} streams
3854
%endif
3955

40-
Requires: python3-testtools >= 0.9.22
41-
Requires: python3-six
42-
%{?python_provide:%python_provide python3-%{pypi_name}}
4356

44-
%description -n python3-%{pypi_name}
45-
Fixtures defines a Python contract for reusable state / support logic,
46-
primarily for unit testing. Helper and adaption logic is included to
47-
make it easy to write your own fixtures using the fixtures contract.
48-
Glue code is provided that makes using fixtures that meet the Fixtures
49-
contract in unit test compatible test cases easy and straight forward.
57+
%prep
58+
%autosetup -p1 -n %{pypi_name}-%{version}
5059

60+
# The code supports falling back to the standard library mock, but some tests
61+
# intentionally only test with the pypi mock.
62+
sed -e '/mock/d' -i setup.cfg
63+
sed -e 's/import mock/import unittest.mock as mock/' -i fixtures/tests/_fixtures/test_mockpatch.py
5164

52-
%prep
53-
%autosetup -n %{pypi_name}-%{version}
65+
%generate_buildrequires
66+
%pyproject_buildrequires %{!?with_bootstrap:-t -x streams}
5467

5568
%build
56-
%py3_build
69+
%pyproject_wheel
5770

5871
%install
59-
%py3_install
72+
%pyproject_install
73+
%pyproject_save_files %{pypi_name}
6074

6175
%if %{with tests}
76+
# Note: Tests are executed using the '%tox' macro rather than the direct
77+
# '%{__python3} -m testtools.run fixtures.test_suite' invocation, for better
78+
# compatibility with Python build environments.
6279
%check
63-
%{__python3} -m testtools.run fixtures.test_suite
64-
%endif # if with tests
65-
80+
%if %{without bootstrap}
81+
%tox
82+
%endif
83+
%endif
6684

67-
%files -n python3-%{pypi_name}
68-
%doc README GOALS NEWS Apache-2.0 BSD COPYING
69-
%{python3_sitelib}/%{pypi_name}
70-
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
85+
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
86+
%license Apache-2.0 BSD
87+
%doc README.rst GOALS NEWS
7188

7289
%changelog
73-
* Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 3.0.0-18
74-
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
90+
* Thu Feb 20 2025 Akarsh Chaudhary <[email protected]> - 4.0.1-11
91+
- Initial CBL-Mariner import from Fedora 41 (license: MIT).
92+
- License verified.
93+
94+
* Fri Jul 19 2024 Fedora Release Engineering <[email protected]> - 4.0.1-10
95+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
96+
97+
* Fri Jun 07 2024 Python Maint <[email protected]> - 4.0.1-9
98+
- Rebuilt for Python 3.13
99+
100+
* Fri Jan 26 2024 Fedora Release Engineering <[email protected]> - 4.0.1-8
101+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
102+
103+
* Mon Jan 22 2024 Fedora Release Engineering <[email protected]> - 4.0.1-7
104+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
105+
106+
* Tue Oct 17 2023 Zane Bitter <[email protected]> - 4.0.1-6
107+
- Add streams extra
108+
109+
* Fri Jul 21 2023 Fedora Release Engineering <[email protected]> - 4.0.1-5
110+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
111+
112+
* Fri Jun 16 2023 Python Maint <[email protected]> - 4.0.1-4
113+
- Rebuilt for Python 3.12
114+
115+
* Tue Jun 13 2023 Python Maint <[email protected]> - 4.0.1-3
116+
- Bootstrap for Python 3.12
117+
118+
* Wed Jun 07 2023 Jan Friesse <[email protected]> - 4.0.1-2
119+
- migrated to SPDX license
120+
121+
* Mon Feb 06 2023 Joel Capitao <[email protected]> - 4.0.1-1
122+
- Update to latest upstream (#2078479)
123+
124+
* Fri Jan 20 2023 Fedora Release Engineering <[email protected]> - 3.0.0-32
125+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
126+
127+
* Fri Jul 22 2022 Fedora Release Engineering <[email protected]> - 3.0.0-31
128+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
129+
130+
* Wed Jun 15 2022 Python Maint <[email protected]> - 3.0.0-30
131+
- Rebuilt for Python 3.11
132+
133+
* Wed Jun 15 2022 Python Maint <[email protected]> - 3.0.0-29
134+
- Bootstrap for Python 3.11
135+
136+
* Fri Apr 29 2022 Carl George <[email protected]> - 3.0.0-28
137+
- Convert to pyproject macros
138+
139+
* Wed Feb 23 2022 Alfredo Moralejo <[email protected]> - 3.0.0-27
140+
- Added python3-extras as runtime requirement
141+
142+
* Fri Jan 21 2022 Fedora Release Engineering <[email protected]> - 3.0.0-26
143+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
144+
145+
* Tue Jul 27 2021 Fedora Release Engineering <[email protected]> - 3.0.0-25
146+
- Second attempt - Rebuilt for
147+
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
148+
149+
* Wed Jun 02 2021 Python Maint <[email protected]> - 3.0.0-24
150+
- Rebuilt for Python 3.10
151+
152+
* Wed Jun 02 2021 Python Maint <[email protected]> - 3.0.0-23
153+
- Bootstrap for Python 3.10
154+
155+
* Wed Jan 27 2021 Fedora Release Engineering <[email protected]> - 3.0.0-22
156+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
157+
158+
* Thu Oct 01 2020 Javier Peña <[email protected]> - 3.0.0-21
159+
- Skip unit tests failing in Python 3.0 (bz#1787753)
160+
161+
* Sat Aug 01 2020 Fedora Release Engineering <[email protected]> - 3.0.0-20
162+
- Second attempt - Rebuilt for
163+
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
164+
165+
* Wed Jul 29 2020 Fedora Release Engineering <[email protected]> - 3.0.0-19
166+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
167+
168+
* Fri May 22 2020 Miro Hrončok <[email protected]> - 3.0.0-18
169+
- Bootstrap for Python 3.9
75170

76171
* Thu Jan 30 2020 Fedora Release Engineering <[email protected]> - 3.0.0-17
77172
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

SPECS-EXTENDED/python-testtools/SOURCES/testtools-2.4.0-fix_py39_test.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)