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