]> git.pld-linux.org Git - packages/python-discover.git/blame - python-discover.spec
noarch; rel 5
[packages/python-discover.git] / python-discover.spec
CommitLineData
c129f656
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6Summary: Test discovery for unittest (backport from Python 2.7)
7Summary(pl.UTF-8): Wykrywanie testów dla modułu unittest (backport z Pythona 2.7)
8Name: python-discover
9Version: 0.4.0
6bded4a9 10Release: 5
77a2a3fe 11License: BSD
c129f656 12Group: Development/Languages/Python
3a656ac9
JB
13#Source0Download: https://pypi.org/simple/discover/
14Source0: https://files.pythonhosted.org/packages/source/d/discover/discover-%{version}.tar.gz
c129f656 15# Source0-md5: 30bb643af4f5ea47fff572b5c346207d
3a656ac9 16URL: https://pypi.org/project/discover/
c129f656
JB
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-devel >= 1:2.4
21%endif
22%if %{with python3}
23BuildRequires: python3-devel >= 1:3.2
24%endif
25Requires: python-modules >= 1:2.4
6bded4a9 26BuildArch: noarch
c129f656
JB
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30This is the test discovery mechanism and ``load_tests`` protocol for
31unittest backported from Python 2.7 to work with Python 2.4 or more
32recent (including Python 3).
33
34%description -l pl.UTF-8
35Ten moduł zawiera mechanizm znajdowania testów oraz protokół
36"load_tests" dla modułu unittest przeniesiony z Pythona 2.7 tak, aby
37działał z Pythonem 2.4 i nowszymi (włącznie z Pythonem 3).
38
39%package -n python3-discover
40Summary: Test discovery for unittest (backport from Python 2.7)
41Summary(pl.UTF-8): Wykrywanie testów dla modułu unittest (backport z Pythona 2.7)
42Group: Development/Languages/Python
43Requires: python3-modules >= 1:3.2
44
45%description -n python3-discover
46This is the test discovery mechanism and ``load_tests`` protocol for
47unittest backported from Python 2.7 to work with Python 2.4 or more
48recent (including Python 3).
49
50%description -n python3-discover -l pl.UTF-8
51Ten moduł zawiera mechanizm znajdowania testów oraz protokół
52"load_tests" dla modułu unittest przeniesiony z Pythona 2.7 tak, aby
53działał z Pythonem 2.4 i nowszymi (włącznie z Pythonem 3).
54
55%prep
56%setup -q -n discover-%{version}
57
58%build
59%if %{with python2}
60%py_build
61%endif
62
63%if %{with python3}
64%py3_build
65%endif
66
67%install
68rm -rf $RPM_BUILD_ROOT
69
70%if %{with python2}
71%py_install
72
73%{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-2}
74%py_postclean
75%endif
76
77%if %{with python3}
78%py3_install
79
80%{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-3}
81%endif
82
83%if %{with python2}
84ln -sf discover-2 $RPM_BUILD_ROOT%{_bindir}/discover
85%endif
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
91%files
92%defattr(644,root,root,755)
93%doc README.txt
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
99%endif
100%endif
101
102%if %{with python3}
103%files -n python3-discover
104%defattr(644,root,root,755)
105%doc README.txt
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
110%endif
This page took 0.106793 seconds and 4 git commands to generate.