]> git.pld-linux.org Git - packages/python-discover.git/blob - python-discover.spec
ddf56a64327a4129c590c0b8777ea282de668844
[packages/python-discover.git] / python-discover.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
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)
8 Name:           python-discover
9 Version:        0.4.0
10 Release:        4
11 License:        BSD
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
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.4
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-devel >= 1:3.2
24 %endif
25 Requires:       python-modules >= 1:2.4
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
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).
32
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).
37
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
43
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).
48
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).
53
54 %prep
55 %setup -q -n discover-%{version}
56
57 %build
58 %if %{with python2}
59 %py_build
60 %endif
61
62 %if %{with python3}
63 %py3_build
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %if %{with python2}
70 %py_install
71
72 %{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-2}
73 %py_postclean
74 %endif
75
76 %if %{with python3}
77 %py3_install
78
79 %{__mv} $RPM_BUILD_ROOT%{_bindir}/discover{,-3}
80 %endif
81
82 %if %{with python2}
83 ln -sf discover-2 $RPM_BUILD_ROOT%{_bindir}/discover
84 %endif
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %if %{with python2}
90 %files
91 %defattr(644,root,root,755)
92 %doc README.txt
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
98 %endif
99 %endif
100
101 %if %{with python3}
102 %files -n python3-discover
103 %defattr(644,root,root,755)
104 %doc README.txt
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
109 %endif
This page took 0.053307 seconds and 2 git commands to generate.