File python-paisley.spec of Package python-paisley
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: python-paisley
Version: 0.1
Release: 1%{?dist}
Summary: Paisley is a CouchDB client written in Python to be used within a Twisted application.
Group: Development/Languages
License: MIT / X / Expat License
URL: https://launchpad.net/paisley
Source0: http://launchpad.net/paisley/0.1/0.1/+download/paisley-0.1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
Requires: python-twisted-core
Requires: python-simplejson
%description
Paisley is a CouchDB client written in Python to be used within a Twisted application.
%prep
%setup -q -n paisley-%{version}
%build
# Remove CFLAGS=... for noarch packages (unneeded)
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
# For noarch packages: sitelib
%{python_sitelib}/*
# For arch-specific packages: sitearch
#%{python_sitearch}/*
%changelog