%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif Name: python-scripttest Version: 1.0.4 Release: 2%{?dist} Summary: Helper to test command-line scripts Group: Development/Languages License: MIT URL: http://pypi.python.org/pypi/ScriptTest/ Source0: http://pypi.python.org/packages/source/S/ScriptTest/ScriptTest-%{version}.tar.gz # Issue preventing build and usage on ext4. # Patch sent to upstream http://bitbucket.org/ianb/scripttest/issue/8 Patch0: python-scripttest-1.0.4-files_updated.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools-devel BuildRequires: python-sphinx BuildRequires: python-nose %description ScriptTest is a library to help you test your interactive command-line applications. With it you can easily run the command (in a subprocess) and see the output (stdout, stderr) and any file modifications. %prep %setup -q -n ScriptTest-%{version} %patch0 -p1 -b .files_updated %build %{__python} setup.py build # generate docs PYTHONPATH=./build/lib:$PYTHONPATH ./regen-docs rm docs/_build/objects.inv rm -rf docs/_build/.doctrees rm docs/_build/.buildinfo mv docs/_build docs/html %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} %clean rm -rf %{buildroot} %check ./test %files %defattr(-,root,root,-) %doc docs/html %doc docs/license.txt %{python_sitelib}/scripttest/ %{python_sitelib}/ScriptTest*.egg-info %changelog * Wed Jul 21 2010 Martin Bacovsky - 1.0.4-2 - generated docs moved to html subdir - license file added to docs * Tue Jul 13 2010 Martin Bacovsky - 1.0.4-1 - Initial package - fixed issue preventing build and usage on ext4.