%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.5 Release: %mkrel 4 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} Requires: python-pkg-resources BuildRequires: libattr-devel BuildRequires: python-setuptools BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(python) BuildRequires: python-cffi BuildRequires: python-ply BuildRequires: python-pycparser BuildRequires: pkgconfig(python3) BuildRequires: python3-setuptools BuildRequires: python3-cffi BuildRequires: python3-ply BuildRequires: python3-pycparser %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). %package -n python3-xattr Summary: Extended attributes for Python3 Group: Development/Python %description -n python3-xattr 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 cp -a . %{py3dir} %build pushd %{py3dir} CFLAGS="%{optflags}" %{__python3} setup.py build popd CFLAGS="%{optflags}" %{__python} setup.py build %install pushd %{py3dir} %{__python3} setup.py install --skip-build --root="%{buildroot}" --install-purelib=%{python3_sitearch} popd %{__python} setup.py install --skip-build --root="%{buildroot}" --install-purelib=%{python_sitearch} %files %{_bindir}/xattr %{python_sitearch}/xattr/ %{python_sitearch}/xattr-%{version}-py?.?.egg-info/ %files -n python3-xattr %{python3_sitearch}/xattr/ %{python3_sitearch}/xattr-%{version}-py?.?.egg-info/