3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_with 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 URL: https://github.com/gabrielfalcao/sure
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.219
21 BuildRequires: python-devel
22 BuildRequires: python-distribute
25 BuildRequires: python3-devel
26 BuildRequires: python3-distribute
27 BuildRequires: python3-modules
29 Requires: python-modules
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 A testing library for python with powerful and flexible assertions.
35 Sure is heavily inspired by should.js.
37 %package -n python3-%{module}
38 Summary: Utility belt for automated testing in python for python
39 Group: Libraries/Python
40 Requires: python3-modules
42 %description -n python3-%{module}
43 A testing library for python with powerful and flexible assertions.
44 Sure is heavily inspired by should.js.
47 %setup -q -n %{module}-%{version}
51 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
55 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
56 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
60 rm -rf $RPM_BUILD_ROOT
63 %{__python} setup.py \
64 build --build-base build-2 \
65 install --skip-build \
67 --root=$RPM_BUILD_ROOT
73 %{__python3} setup.py \
74 build --build-base build-3 \
75 install --skip-build \
77 --root=$RPM_BUILD_ROOT
81 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
87 %dir %{py_sitescriptdir}/sure
88 %{py_sitescriptdir}/sure/*.py[co]
89 %if "%{py_ver}" > "2.4"
90 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
98 %{py3_sitescriptdir}/%{module}
99 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info