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: Easy to use mocking/stub/spy framework
13 Group: Development/Libraries
14 Source0: http://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
15 # Source0-md5: fce8d1deb08ef6c1fb2b56eea7ae7b67
16 URL: http://pypi.python.org/pypi/chai
17 BuildRequires: rpmbuild(macros) >= 1.710
18 BuildRequires: python-devel
19 BuildRequires: python-nose
20 BuildRequires: python-setuptools
21 BuildRequires: rpm-pythonprov
23 BuildRequires: python3-devel
24 BuildRequires: python3-nose
25 BuildRequires: python3-setuptools
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Chai provides a very easy to use API for mocking/stubbing your Python
32 objects, patterned after the Mocha <http://mocha.rubyforge.org/>
35 %package -n python3-%{module}
36 Summary: Easy to use mocking/stub framework
37 Group: Development/Libraries
39 %description -n python3-%{module}
40 Chai provides a very easy to use API for mocking/stubbing your python
41 objects, patterned after the Mocha <http://mocha.rubyforge.org/>
45 %setup -q -n %{module}-%{version}
47 # Remove bundled egg-info in case it exists
48 rm -r %{module}.egg-info
52 %py_build %{?with_tests:test}
56 # Remove python2 compatibility files
57 # Makes tests fail and are not needed on python3
59 rm tests/comparator_py2.py
63 %py3_build %{?with_tests:test}
67 rm -rf $RPM_BUILD_ROOT
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
83 %doc README.rst LICENSE.txt
84 %{py_sitescriptdir}/chai
85 %{py_sitescriptdir}/chai-%{version}-py*.egg-info
88 %files -n python3-%{module}
89 %defattr(644,root,root,755)
90 %doc README.rst LICENSE.txt
91 %{py3_sitescriptdir}/chai
92 %{py3_sitescriptdir}/chai-%{version}-py*.egg-info