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
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This is the test discovery mechanism and ``load_tests`` protocol for
30 unittest backported from Python 2.7 to work with Python 2.4 or more
31 recent (including Python 3).
33 %description -l pl.UTF-8
34 Ten moduł zawiera mechanizm znajdowania testów oraz protokół
35 "load_tests" dla modułu unittest przeniesiony z Pythona 2.7 tak, aby
36 działał z Pythonem 2.4 i nowszymi (włącznie z Pythonem 3).
38 %package -n python3-discover
39 Summary: Test discovery for unittest (backport from Python 2.7)
40 Summary(pl.UTF-8): Wykrywanie testów dla modułu unittest (backport z Pythona 2.7)
41 Group: Development/Languages/Python
42 Requires: python3-modules >= 1:3.2
44 %description -n python3-discover
45 This is the test discovery mechanism and ``load_tests`` protocol for
46 unittest backported from Python 2.7 to work with Python 2.4 or more
47 recent (including Python 3).
49 %description -n python3-discover -l pl.UTF-8
50 Ten moduł zawiera mechanizm znajdowania testów oraz protokół
51 "load_tests" dla modułu unittest przeniesiony z Pythona 2.7 tak, aby
52 działał z Pythonem 2.4 i nowszymi (włącznie z Pythonem 3).
55 %setup -q -n discover-%{version}
67 rm -rf $RPM_BUILD_ROOT
72 %{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-2}
79 %{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-3}
83 ln -sf discover-2 $RPM_BUILD_ROOT%{_bindir}/discover
87 rm -rf $RPM_BUILD_ROOT
91 %defattr(644,root,root,755)
93 %attr(755,root,root) %{_bindir}/discover
94 %attr(755,root,root) %{_bindir}/discover-2
95 %{py_sitescriptdir}/discover.py[co]
96 %if "%{py_ver}" > "2.4"
97 %{py_sitescriptdir}/discover-%{version}-py*.egg-info
102 %files -n python3-discover
103 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_bindir}/discover-3
106 %{py3_sitescriptdir}/discover.py
107 %{py3_sitescriptdir}/__pycache__/discover.cpython-*.py[co]
108 %{py3_sitescriptdir}/discover-%{version}-py*.egg-info