]> git.pld-linux.org Git - packages/python-pyxattr.git/blob - python-pyxattr.spec
2feb48f802f57d39efe46cb397f206a3e9128d0b
[packages/python-pyxattr.git] / python-pyxattr.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  pyxattr
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
9 Name:           python-%{module}
10 Version:        0.6.1
11 Release:        1
12 License:        LGPL v2.1+
13 Group:          Libraries/Python
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
20 BuildRequires:  python-setuptools
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
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Python 2 module for accessing Extended Attributes of the files.
33
34 %description -l pl.UTF-8
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
48 plików.
49
50 %prep
51 %setup -q -n %{module}-%{version}
52
53 %build
54 #CC="%{__cc}" \
55 #CFLAGS="%{rpmcppflags} %{rpmcflags}"
56 %if %{with python2}
57 %py_build
58 %endif
59
60 %if %{with python3}
61 %py3_build
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 %if %{with python2}
68 %py_install
69 %endif
70
71 %if %{with python3}
72 %py3_install
73 %endif
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %files
80 %defattr(644,root,root,755)
81 %doc NEWS README.rst
82 %attr(755,root,root) %{py_sitedir}/xattr.so
83 %{py_sitedir}/pyxattr-%{version}-py*.egg-info
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
This page took 0.076445 seconds and 2 git commands to generate.