]> git.pld-linux.org Git - packages/python-ddt.git/blob - python-ddt.spec
rebuild with python 3.10
[packages/python-ddt.git] / python-ddt.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Data-Driven Tests - library to multiply test cases
8 Summary(pl.UTF-8):      Data-Driven Tests - biblioteka do zwielokrotniania przypadków testowych
9 Name:           python-ddt
10 Version:        1.2.1
11 Release:        5
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/ddt/
15 Source0:        https://files.pythonhosted.org/packages/source/d/ddt/ddt-%{version}.tar.gz
16 # Source0-md5:  1270d706454088ea108f23fbaa800e56
17 Patch0:         %{name}-mock.patch
18 URL:            https://github.com/txels/ddt
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-mock
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.3
28 BuildRequires:  python3-setuptools
29 %endif
30 Requires:       python-modules >= 1:2.7
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 DDT (Data-Driven Tests) allows you to multiply one test case by
36 running it with different test data, and make it appear as multiple
37 test cases.
38
39 %description -l pl.UTF-8
40 Biblioteka DDT (Data-Driven Tests - testy sterowane danymi) pozwala na
41 zwielotnianie pojedynczego przypadku testowego poprzez uruchamianie go
42 z różnymi danymi testowymi i traktowanie go jako wielu przypadków
43 testowych.
44
45 %package -n python3-ddt
46 Summary:        Data-Driven Tests - library to multiply test cases
47 Summary(pl.UTF-8):      Data-Driven Tests - biblioteka do zwielokrotniania przypadków testowych
48 Group:          Libraries/Python
49 Requires:       python3-modules >= 1:3.3
50
51 %description -n python3-ddt
52 DDT (Data-Driven Tests) allows you to multiply one test case by
53 running it with different test data, and make it appear as multiple
54 test cases.
55
56 %description -n python3-ddt -l pl.UTF-8
57 Biblioteka DDT (Data-Driven Tests - testy sterowane danymi) pozwala na
58 zwielotnianie pojedynczego przypadku testowego poprzez uruchamianie go
59 z różnymi danymi testowymi i traktowanie go jako wielu przypadków
60 testowych.
61
62 %prep
63 %setup -q -n ddt-%{version}
64 %patch0 -p1
65
66 %build
67 %if %{with python2}
68 %py_build %{?with_tests:test}
69 %endif
70
71 %if %{with python3}
72 %py3_build %{?with_tests:test}
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %py_install
80
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc LICENSE.md README.md
95 %{py_sitescriptdir}/ddt.py[co]
96 %{py_sitescriptdir}/ddt-%{version}-py*.egg-info
97 %endif
98
99 %if %{with python3}
100 %files -n python3-ddt
101 %defattr(644,root,root,755)
102 %doc LICENSE.md README.md
103 %{py3_sitescriptdir}/ddt.py
104 %{py3_sitescriptdir}/__pycache__/ddt.cpython-*.py[co]
105 %{py3_sitescriptdir}/ddt-%{version}-py*.egg-info
106 %endif
This page took 0.044877 seconds and 3 git commands to generate.