%define real_name xattr # we don't want to provide private python extension libs %define _exclude_files_from_autoprov %{python_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so Summary: Extended attributes for python Name: python-xattr Version: 0.7.2 Release: %mkrel 3 License: GPL Group: Development/Python URL: http://pypi.python.org/pypi/xattr Source: http://pypi.python.org/packages/source/x/xattr/xattr-%{version}.tar.gz Provides: pyxattr = %{version}-%{release} BuildRequires: libattr-devel BuildRequires: python-setuptools BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(python) %description python-xattr is a C extension module for Python which implements extended attributes manipulation. It is a wrapper on top of the attr C library - see attr(5). %prep %setup -q -n %{real_name}-%{version} rm -rf xattr.egg-info %build CFLAGS="%{optflags}" %{__python} setup.py build %install %{__python} setup.py install --skip-build --root="%{buildroot}" --install-purelib=%{python_sitearch} %files %{_bindir}/xattr %{python_sitearch}/*