%global pypi_name versiontools Name: python-versiontools Version: 1.9.1 Release: 1%{?dist} Summary: Smart replacement for plain tuple used in __version__ License: LGPLv3 URL: https://launchpad.net/versiontools Source0: http://pypi.python.org/packages/source/v/versiontools/versiontools-1.9.1.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-sphinx BuildRequires: python-nose %description Smart replacement for plain tuple used in __version__ %prep %setup -q -n %{pypi_name}-%{version} # remove bundled egg-info rm -rf %{pypi_name}.egg-info # generate html docs sphinx-build doc html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %build %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} %check %{__python} setup.py nosetests %files %doc html %{python_sitelib}/* %changelog * Thu May 03 2012 Bohuslav Kabrda - 1.9.1-1 - Initial package.