# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: playitagainsam Version: 0.3.0 Release: 1%{?dist} Summary: Record and replay interactive terminal sessions Group: Development/Languages License: MIT URL: http://retask.readthedocs.org/en/latest/index.html Source0: https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-six %description Playitagainsam is a tool and a corresponding file format for recording and replaying interactive terminal sessions. It takes inspiration from the unix commands "script" and "ttyrec" and the python tool "playerpiano". %prep %setup -q -n %{name}-%{version} sed -i -e '/^#!\//, 1d' %{name}/__main__.py %build %{__python2} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %files %doc LICENSE.txt README.rst # For noarch packages: sitelib %{python2_sitelib}/playitagainsam* %{_bindir}/pias %changelog * Sun May 4 2014 Clint Savage 0.3.0-1 - Initial release