3 %bcond_without tests # do not perform "make test"
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
13 Group: Libraries/Python
14 # Source0: https://github.com/gabrielfalcao/sure/archive/%{version}.tar.gz
15 Source0: https://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: fc57c30e76bddba68f84443ec91e7026
17 Patch0: %{name}-py3_fixes.patch
18 URL: https://github.com/gabrielfalcao/sure
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.219
22 BuildRequires: python-devel
23 BuildRequires: python-distribute
26 BuildRequires: python3-devel
27 BuildRequires: python3-distribute
28 BuildRequires: python3-modules
30 Requires: python-modules
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 A testing library for python with powerful and flexible assertions.
36 Sure is heavily inspired by should.js.
38 %package -n python3-%{module}
39 Summary: Utility belt for automated testing in python for python
40 Group: Libraries/Python
41 Requires: python3-modules
43 %description -n python3-%{module}
44 A testing library for python with powerful and flexible assertions.
45 Sure is heavily inspired by should.js.
48 %setup -q -n %{module}-%{version}
53 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
57 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
61 rm -rf $RPM_BUILD_ROOT
64 %{__python} setup.py \
65 build --build-base build-2 \
66 install --skip-build \
68 --root=$RPM_BUILD_ROOT
74 %{__python3} setup.py \
75 build --build-base build-3 \
76 install --skip-build \
78 --root=$RPM_BUILD_ROOT
82 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
88 %dir %{py_sitescriptdir}/sure
89 %{py_sitescriptdir}/sure/*.py[co]
90 %if "%{py_ver}" > "2.4"
91 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
96 %files -n python3-%{module}
97 %defattr(644,root,root,755)
99 %{py3_sitescriptdir}/%{module}
100 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info