3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: Utility belt for automated testing in Python for Python
9 Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download; https://pypi.org/simple/sure/
16 Source0: https://files.pythonhosted.org/packages/source/s/sure/%{module}-%{version}.tar.gz
17 # Source0-md5: 51f28b4ea7a6f59d1dd09f8eaaeabee7
18 Patch0: %{name}-mock.patch
19 URL: https://github.com/gabrielfalcao/sure
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-mock >= 2.0.0
23 BuildRequires: python-nose
24 BuildRequires: python-setuptools
25 BuildRequires: python-six >= 1.10.0
28 BuildRequires: python3-devel >= 1:3.4
29 BuildRequires: python3-nose
30 BuildRequires: python3-setuptools
31 BuildRequires: python3-six >= 1.10.0
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.714
35 Requires: python-modules >= 1:2.7
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 A testing library for Python with powerful and flexible assertions.
41 Sure is heavily inspired by should.js.
43 %description -l pl.UTF-8
44 Biblioteka testów dla Pythona z bardzo elastycznymi asercjami. Sure
45 jest znacząco zainspirowany should.js.
47 %package -n python3-%{module}
48 Summary: Utility belt for automated testing in python for python
49 Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
50 Group: Libraries/Python
51 Requires: python3-modules >= 1:3.4
53 %description -n python3-%{module}
54 A testing library for Python with powerful and flexible assertions.
55 Sure is heavily inspired by should.js.
57 %description -n python3-%{module} -l pl.UTF-8
58 Biblioteka testów dla Pythona z bardzo elastycznymi asercjami. Sure
59 jest znacząco zainspirowany should.js.
62 %setup -q -n %{module}-%{version}
67 %py_build %{?with_tests:test}
71 %py3_build %{?with_tests:test}
75 rm -rf $RPM_BUILD_ROOT
88 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
94 %{py_sitescriptdir}/sure
95 %{py_sitescriptdir}/sure-%{version}-py*.egg-info
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
102 %{py3_sitescriptdir}/sure
103 %{py3_sitescriptdir}/sure-%{version}-py*.egg-info