1 # NOTE: sure.cli and sure.stubs are python3-only
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: Utility belt for automated testing in Python for Python
10 Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
11 Name: python-%{module}
15 Group: Libraries/Python
16 #Source0Download; https://pypi.org/simple/sure/
17 Source0: https://files.pythonhosted.org/packages/source/s/sure/%{module}-%{version}.tar.gz
18 # Source0-md5: 2944861acf83042a291ffb1190a56292
19 Patch0: %{name}-mock.patch
20 URL: https://github.com/gabrielfalcao/sure
22 BuildRequires: python-devel >= 1:2.7
23 BuildRequires: python-mock >= 2.0.0
24 BuildRequires: python-nose
25 BuildRequires: python-setuptools
26 BuildRequires: python-six >= 1.16.0
29 BuildRequires: python3-devel >= 1:3.4
30 BuildRequires: python3-nose
31 BuildRequires: python3-setuptools
32 BuildRequires: python3-six >= 1.16.0
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 A testing library for Python with powerful and flexible assertions.
42 Sure is heavily inspired by should.js.
44 %description -l pl.UTF-8
45 Biblioteka testów dla Pythona z bardzo elastycznymi asercjami. Sure
46 jest znacząco zainspirowany should.js.
48 %package -n python3-%{module}
49 Summary: Utility belt for automated testing in python for python
50 Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
51 Group: Libraries/Python
52 Requires: python3-modules >= 1:3.4
54 %description -n python3-%{module}
55 A testing library for Python with powerful and flexible assertions.
56 Sure is heavily inspired by should.js.
58 %description -n python3-%{module} -l pl.UTF-8
59 Biblioteka testów dla Pythona z bardzo elastycznymi asercjami. Sure
60 jest znacząco zainspirowany should.js.
63 %setup -q -n %{module}-%{version}
68 %py_build %{?with_tests:test}
72 %py3_build %{?with_tests:test}
76 rm -rf $RPM_BUILD_ROOT
81 # sure.cli is python3-only (uses f"..." syntax), so this entry point is invalid
82 %{__rm} $RPM_BUILD_ROOT%{_bindir}/sure
90 %{__mv} $RPM_BUILD_ROOT%{_bindir}/sure{,-3}
94 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
100 %{py_sitescriptdir}/sure
101 %{py_sitescriptdir}/sure-%{version}-py*.egg-info
105 %files -n python3-%{module}
106 %defattr(644,root,root,755)
108 %attr(755,root,root) %{_bindir}/sure-3
109 %{py3_sitescriptdir}/sure
110 %{py3_sitescriptdir}/sure-%{version}-py*.egg-info