]>
Commit | Line | Data |
---|---|---|
0a86f25e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
cf1352fd | 6 | %define module pyxdg |
0a86f25e JB |
7 | Summary: Python 2 implementations of freedesktop.org standards |
8 | Summary(pl.UTF-8): Implementacje standardów freedesktop.org w języku Python 2 | |
cf1352fd | 9 | Name: python-%{module} |
0a86f25e | 10 | Version: 0.25 |
d3ceaaeb | 11 | Release: 3 |
0a86f25e | 12 | License: LGPL v2 |
e0e7044f | 13 | Group: Libraries/Python |
0a86f25e JB |
14 | Source0: http://people.freedesktop.org/~takluyver/%{module}-%{version}.tar.gz |
15 | # Source0-md5: bedcdb3a0ed85986d40044c87f23477c | |
cf1352fd | 16 | URL: http://freedesktop.org/Software/pyxdg |
0a86f25e JB |
17 | %{?with_python2:BuildRequires: python-devel >= 1:2.6} |
18 | %{?with_python3:BuildRequires: python3-devel >= 1:3.2} | |
1aafa182 | 19 | BuildRequires: rpm-pythonprov |
e63c3a6f | 20 | BuildRequires: rpmbuild(macros) >= 1.219 |
0a86f25e | 21 | Requires: python-modules |
cf1352fd | 22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
0a86f25e | 26 | PyXDG is a Python module to access freedesktop.org standards. The |
f7e7e0e2 | 27 | package contains: |
28 | ||
0a86f25e JB |
29 | - Implementation of the XDG-Base-Directory Standard |
30 | - Implementation of the XDG-Desktop Standard | |
31 | - Implementation of the XDG-Menu Standard | |
32 | - Implementation of the XDG-Icon-Theme Standard | |
33 | - Implementation of the XDG-Shared MIME-info Database | |
34 | - Implementation of the XDG-Recent File Storage Specification | |
cf1352fd | 35 | |
36 | %description -l pl.UTF-8 | |
f7e7e0e2 | 37 | PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie |
38 | standardów freedesktop.org. Pakiet zawiera: | |
39 | ||
0a86f25e JB |
40 | - Implementację standardu XDG-Base-Directory |
41 | - Implementację standardu XDG-Desktop | |
42 | - Implementację standardu XDG-Menu | |
43 | - Implementację standardu XDG-Icon-Theme | |
44 | - Implementację bazy XDG-Shared MIME-info | |
45 | - Implementację specyfikacji XDG-Recent File Storage | |
46 | ||
47 | %package -n python3-pyxdg | |
48 | Summary: Python 3 implementations of freedesktop.org standards | |
49 | Summary(pl.UTF-8): Implementacje standardów freedesktop.org w języku Python 3 | |
50 | Group: Libraries/Python | |
51 | Requires: python3-modules | |
52 | ||
53 | %description -n python3-pyxdg | |
54 | PyXDG is a Python module to access freedesktop.org standards. The | |
55 | package contains: | |
56 | ||
57 | - Implementation of the XDG-Base-Directory Standard | |
58 | - Implementation of the XDG-Desktop Standard | |
59 | - Implementation of the XDG-Menu Standard | |
60 | - Implementation of the XDG-Icon-Theme Standard | |
61 | - Implementation of the XDG-Shared MIME-info Database | |
62 | - Implementation of the XDG-Recent File Storage Specification | |
63 | ||
64 | %description -n python3-pyxdg -l pl.UTF-8 | |
65 | PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie | |
66 | standardów freedesktop.org. Pakiet zawiera: | |
67 | ||
68 | - Implementację standardu XDG-Base-Directory | |
69 | - Implementację standardu XDG-Desktop | |
70 | - Implementację standardu XDG-Menu | |
71 | - Implementację standardu XDG-Icon-Theme | |
72 | - Implementację bazy XDG-Shared MIME-info | |
73 | - Implementację specyfikacji XDG-Recent File Storage | |
cf1352fd | 74 | |
75 | %prep | |
76 | %setup -q -n %{module}-%{version} | |
77 | ||
78 | %build | |
0a86f25e | 79 | %if %{with python2} |
49632ee8 | 80 | %py_build \ |
0a86f25e JB |
81 | --build-base build-2 |
82 | %endif | |
83 | ||
84 | %if %{with python3} | |
49632ee8 | 85 | %py3_build \ |
0a86f25e JB |
86 | --build-base build-3 |
87 | %endif | |
cf1352fd | 88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
0a86f25e JB |
91 | |
92 | %if %{with python2} | |
93 | %{__python} setup.py \ | |
94 | build \ | |
95 | --build-base build-2 \ | |
96 | install \ | |
97 | --optimize=2 \ | |
98 | --root=$RPM_BUILD_ROOT | |
16387b2a | 99 | %py_postclean |
0a86f25e JB |
100 | %endif |
101 | ||
102 | %if %{with python3} | |
103 | %{__python3} setup.py \ | |
104 | build \ | |
105 | --build-base build-3 \ | |
106 | install \ | |
107 | --optimize=2 \ | |
108 | --root=$RPM_BUILD_ROOT | |
109 | %endif | |
cf1352fd | 110 | |
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
0a86f25e | 114 | %if %{with python2} |
cf1352fd | 115 | %files |
116 | %defattr(644,root,root,755) | |
0a86f25e | 117 | %doc AUTHORS ChangeLog README TODO |
cf1352fd | 118 | %dir %{py_sitescriptdir}/xdg |
16387b2a | 119 | %{py_sitescriptdir}/xdg/*.py[co] |
3e92722c ER |
120 | %{py_sitescriptdir}/pyxdg-%{version}-py*.egg-info |
121 | %endif | |
0a86f25e JB |
122 | |
123 | %if %{with python3} | |
124 | %files -n python3-pyxdg | |
125 | %defattr(644,root,root,755) | |
126 | %doc AUTHORS ChangeLog README TODO | |
127 | %dir %{py3_sitescriptdir}/xdg | |
128 | %{py3_sitescriptdir}/xdg/*.py | |
129 | %{py3_sitescriptdir}/xdg/__pycache__ | |
130 | %{py3_sitescriptdir}/pyxdg-%{version}-py*.egg-info | |
131 | %endif |