3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: Test discovery for unittest (backport from Python 2.7)
7 Summary(pl.UTF-8): Wykrywanie testów dla modułu unittest (backport z Pythona 2.7)
12 Group: Development/Languages/Python
13 #Source0Download: https://pypi.org/simple/discover/
14 Source0: https://files.pythonhosted.org/packages/source/d/discover/discover-%{version}.tar.gz
15 # Source0-md5: 30bb643af4f5ea47fff572b5c346207d
16 URL: https://pypi.org/project/discover/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-devel >= 1:2.4
23 BuildRequires: python3-devel >= 1:3.2
25 Requires: python-modules >= 1:2.4
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This is the test discovery mechanism and ``load_tests`` protocol for
31 unittest backported from Python 2.7 to work with Python 2.4 or more
32 recent (including Python 3).
34 %description -l pl.UTF-8
35 Ten moduł zawiera mechanizm znajdowania testów oraz protokół
36 "load_tests" dla modułu unittest przeniesiony z Pythona 2.7 tak, aby
37 działał z Pythonem 2.4 i nowszymi (włącznie z Pythonem 3).
39 %package -n python3-discover
40 Summary: Test discovery for unittest (backport from Python 2.7)
41 Summary(pl.UTF-8): Wykrywanie testów dla modułu unittest (backport z Pythona 2.7)
42 Group: Development/Languages/Python
43 Requires: python3-modules >= 1:3.2
45 %description -n python3-discover
46 This is the test discovery mechanism and ``load_tests`` protocol for
47 unittest backported from Python 2.7 to work with Python 2.4 or more
48 recent (including Python 3).
50 %description -n python3-discover -l pl.UTF-8
51 Ten moduł zawiera mechanizm znajdowania testów oraz protokół
52 "load_tests" dla modułu unittest przeniesiony z Pythona 2.7 tak, aby
53 działał z Pythonem 2.4 i nowszymi (włącznie z Pythonem 3).
56 %setup -q -n discover-%{version}
68 rm -rf $RPM_BUILD_ROOT
73 %{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-2}
80 %{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-3}
84 ln -sf discover-2 $RPM_BUILD_ROOT%{_bindir}/discover
88 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
94 %attr(755,root,root) %{_bindir}/discover
95 %attr(755,root,root) %{_bindir}/discover-2
96 %{py_sitescriptdir}/discover.py[co]
97 %if "%{py_ver}" > "2.4"
98 %{py_sitescriptdir}/discover-%{version}-py*.egg-info
103 %files -n python3-discover
104 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_bindir}/discover-3
107 %{py3_sitescriptdir}/discover.py
108 %{py3_sitescriptdir}/__pycache__/discover.cpython-*.py[co]
109 %{py3_sitescriptdir}/discover-%{version}-py*.egg-info