%global pypi_name dingus Name: python-%{pypi_name} Version: 0.3.4 Release: 1%{?dist} Summary: A record-then-assert mocking library License: MIT URL: https://github.com/garybernhardt/dingus Source0: http://pypi.python.org/packages/source/d/dingus/dingus-0.3.4.tar.gz # to get tests: # git clone https://github.com/garybernhardt/dingus.git && cd dingus # git checkout 0.3.4 # tar -czf dingus-tests-0.3.4.tgz tests/ Source1: dingus-tests-%{version}.tgz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-nose %description A dingus is sort of like a mock object. The main difference is that you don't set up expectations ahead of time. You just run your code, using a dingus in place of another object or class, and it will record what happens to it. Then, once your code has been exercised, you can make assertions about what it did to the dingus. %prep %setup -q -n %{pypi_name}-%{version} %build %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-data %{_docdir}/%{pypi_name} %check tar -xzf %{SOURCE1} nosetests -m '((?:^|[b_.-])(:?[Tt]est|When|should))' %files %doc %{_docdir}/%{pypi_name}/ %{python_sitelib}/* %changelog * Tue Mar 20 2012 Bohuslav Kabrda - 0.3.4-1 - Initial package.