]>
Commit | Line | Data |
---|---|---|
506bd1cf JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
b86ec83a | 6 | %define module pyxattr |
506bd1cf JB |
7 | Summary: Python 2 module for accessing Extended Attributes of the files |
8 | Summary(pl.UTF-8): Moduł Pythona 2 pozwalający na dostęp do rozszerzonych atrybutów plików | |
f82c3263 | 9 | Name: python-%{module} |
506bd1cf | 10 | Version: 0.6.1 |
9d55138e | 11 | Release: 2 |
506bd1cf | 12 | License: LGPL v2.1+ |
f82c3263 | 13 | Group: Libraries/Python |
506bd1cf JB |
14 | Source0: https://pyxattr.k1024.org/downloads/%{module}-%{version}.tar.gz |
15 | # Source0-md5: 523e9d90f9801141c785d93e6197cc33 | |
16 | URL: https://pyxattr.k1024.org/ | |
17 | %if %{with python2} | |
18 | BuildRequires: python-devel >= 1:2.5 | |
19 | BuildRequires: python-modules >= 1:2.5 | |
df8552c3 | 20 | BuildRequires: python-setuptools |
506bd1cf JB |
21 | %endif |
22 | %if %{with python3} | |
23 | BuildRequires: python3-devel >= 1:3.2 | |
24 | BuildRequires: python3-modules >= 1:3.2 | |
25 | BuildRequires: python3-setuptools | |
26 | %endif | |
be0708c0 | 27 | BuildRequires: rpm-pythonprov |
506bd1cf | 28 | BuildRequires: rpmbuild(macros) >= 1.714 |
f82c3263 AM |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
506bd1cf | 32 | Python 2 module for accessing Extended Attributes of the files. |
f82c3263 | 33 | |
bba363a8 | 34 | %description -l pl.UTF-8 |
506bd1cf JB |
35 | Moduł Pythona 2 pozwalający na dostęp do rozszerzonych atrybutów |
36 | plików. | |
37 | ||
38 | %package -n python3-%{module} | |
39 | Summary: Python 3 module for accessing Extended Attributes of the files | |
40 | Summary(pl.UTF-8): Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów plików | |
41 | Group: Libraries/Python | |
42 | ||
43 | %description -n python3-%{module} | |
44 | Python 3 module for accessing Extended Attributes of the files. | |
45 | ||
46 | %description -n python3-%{module} -l pl.UTF-8 | |
47 | Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów | |
bba363a8 | 48 | plików. |
f82c3263 AM |
49 | |
50 | %prep | |
51 | %setup -q -n %{module}-%{version} | |
52 | ||
07602611 | 53 | %build |
506bd1cf JB |
54 | #CC="%{__cc}" \ |
55 | #CFLAGS="%{rpmcppflags} %{rpmcflags}" | |
56 | %if %{with python2} | |
425f3241 | 57 | %py_build |
506bd1cf JB |
58 | %endif |
59 | ||
60 | %if %{with python3} | |
61 | %py3_build | |
62 | %endif | |
07602611 | 63 | |
f82c3263 AM |
64 | %install |
65 | rm -rf $RPM_BUILD_ROOT | |
506bd1cf JB |
66 | |
67 | %if %{with python2} | |
425f3241 | 68 | %py_install |
506bd1cf JB |
69 | %endif |
70 | ||
71 | %if %{with python3} | |
72 | %py3_install | |
73 | %endif | |
f82c3263 AM |
74 | |
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
506bd1cf | 78 | %if %{with python2} |
f82c3263 AM |
79 | %files |
80 | %defattr(644,root,root,755) | |
506bd1cf | 81 | %doc NEWS README.rst |
07602611 ER |
82 | %attr(755,root,root) %{py_sitedir}/xattr.so |
83 | %{py_sitedir}/pyxattr-%{version}-py*.egg-info | |
506bd1cf JB |
84 | %endif |
85 | ||
86 | %if %{with python3} | |
87 | %files -n python3-%{module} | |
88 | %defattr(644,root,root,755) | |
89 | %attr(755,root,root) %{py3_sitedir}/xattr.cpython-*.so | |
90 | %{py3_sitedir}/pyxattr-%{version}-py*.egg-info | |
91 | %endif |