1 |
%define real_name xattr |
2 |
# we don't want to provide private python extension libs |
3 |
%define _exclude_files_from_autoprov %{python_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so |
4 |
|
5 |
Summary: Extended attributes for python |
6 |
Name: python-xattr |
7 |
Version: 0.7.5 |
8 |
Release: %mkrel 4 |
9 |
License: GPL |
10 |
Group: Development/Python |
11 |
URL: http://pypi.python.org/pypi/xattr |
12 |
Source: http://pypi.python.org/packages/source/x/xattr/xattr-%{version}.tar.gz |
13 |
Provides: pyxattr = %{version}-%{release} |
14 |
Requires: python-pkg-resources |
15 |
BuildRequires: libattr-devel |
16 |
BuildRequires: python-setuptools |
17 |
BuildRequires: pkgconfig(libffi) |
18 |
BuildRequires: pkgconfig(python) |
19 |
BuildRequires: python-cffi |
20 |
BuildRequires: python-ply |
21 |
BuildRequires: python-pycparser |
22 |
BuildRequires: pkgconfig(python3) |
23 |
BuildRequires: python3-setuptools |
24 |
BuildRequires: python3-cffi |
25 |
BuildRequires: python3-ply |
26 |
BuildRequires: python3-pycparser |
27 |
|
28 |
%description |
29 |
python-xattr is a C extension module for Python which implements |
30 |
extended attributes manipulation. It is a wrapper on top of the |
31 |
attr C library - see attr(5). |
32 |
|
33 |
%package -n python3-xattr |
34 |
Summary: Extended attributes for Python3 |
35 |
Group: Development/Python |
36 |
|
37 |
%description -n python3-xattr |
38 |
python-xattr is a C extension module for Python which implements |
39 |
extended attributes manipulation. It is a wrapper on top of the |
40 |
attr C library - see attr(5). |
41 |
|
42 |
%prep |
43 |
%setup -q -n %{real_name}-%{version} |
44 |
rm -rf xattr.egg-info |
45 |
cp -a . %{py3dir} |
46 |
|
47 |
%build |
48 |
pushd %{py3dir} |
49 |
CFLAGS="%{optflags}" %{__python3} setup.py build |
50 |
popd |
51 |
|
52 |
CFLAGS="%{optflags}" %{__python} setup.py build |
53 |
|
54 |
%install |
55 |
pushd %{py3dir} |
56 |
%{__python3} setup.py install --skip-build --root="%{buildroot}" --install-purelib=%{python3_sitearch} |
57 |
popd |
58 |
|
59 |
%{__python} setup.py install --skip-build --root="%{buildroot}" --install-purelib=%{python_sitearch} |
60 |
|
61 |
|
62 |
%files |
63 |
%{_bindir}/xattr |
64 |
%{python_sitearch}/xattr/ |
65 |
%{python_sitearch}/xattr-%{version}-py?.?.egg-info/ |
66 |
|
67 |
%files -n python3-xattr |
68 |
%{python3_sitearch}/xattr/ |
69 |
%{python3_sitearch}/xattr-%{version}-py?.?.egg-info/ |
70 |
|