3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: Variables defined by the XDG Base Directory Specification
7 Summary(pl.UTF-8): Zmienne zdefiniowane w specyfikacji XDG Base Directory
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/xdg/
14 Source0: https://files.pythonhosted.org/packages/source/x/xdg/xdg-%{version}.tar.gz
15 # Source0-md5: 5e67a1592905c461a743e72b6478511f
16 Patch0: %{name}-rename.patch
17 URL: https://pypi.org/project/xdg/
19 BuildRequires: python-modules >= 1:2.5
20 BuildRequires: python-setuptools
23 BuildRequires: python3-modules >= 1:3.2
24 BuildRequires: python3-setuptools
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.714
28 Requires: python-modules >= 1:2.5
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 xdg is a tiny Python module which provides the variables defined by
34 the XDG Base Directory Specification, to save you from duplicating the
35 same snippet of logic in every Python utility you write that deals
36 with user cache, configuration, or data files. It has no external
39 %description -l pl.UTF-8
40 xdg to mały moduł Pythona, udostępniający zmienne zdefiniowane w
41 specyfikacji XDG Base Directory, aby oszczędzić duplikowania tej samej
42 logiki w każdym narzędziu pythonowym, które obsługuje pamięć
43 podręczną, konfigurację czy pliki danych użytkownika. Moduł nie ma
44 zewnętrznych zależności.
46 %package -n python3-xdg
47 Summary: Variables defined by the XDG Base Directory Specification
48 Summary(pl.UTF-8): Zmienne zdefiniowane w specyfikacji XDG Base Directory
49 Group: Libraries/Python
50 Requires: python3-modules >= 1:3.2
52 %description -n python3-xdg
53 xdg is a tiny Python module which provides the variables defined by
54 the XDG Base Directory Specification, to save you from duplicating the
55 same snippet of logic in every Python utility you write that deals
56 with user cache, configuration, or data files. It has no external
59 %description -n python3-xdg -l pl.UTF-8
60 xdg to mały moduł Pythona, udostępniający zmienne zdefiniowane w
61 specyfikacji XDG Base Directory, aby oszczędzić duplikowania tej samej
62 logiki w każdym narzędziu pythonowym, które obsługuje pamięć
63 podręczną, konfigurację czy pliki danych użytkownika. Moduł nie ma
64 zewnętrznych zależności.
67 %setup -q -n xdg-%{version}
69 # "xdg" name conflicts with older (but more comprehensive) pyxdg module,
70 # which uses xdg namespace; rename to allow using both in the same system.
72 %{__mv} xdg.py xdgenv.py
84 rm -rf $RPM_BUILD_ROOT
97 rm -rf $RPM_BUILD_ROOT
101 %defattr(644,root,root,755)
102 %doc LICENCE README.rst
103 %{py_sitescriptdir}/xdgenv.py[co]
104 %{py_sitescriptdir}/xdg-%{version}-py*.egg-info
108 %files -n python3-xdg
109 %defattr(644,root,root,755)
110 %doc LICENCE README.rst
111 %{py3_sitescriptdir}/xdgenv.py
112 %{py3_sitescriptdir}/__pycache__/xdgenv.cpython-*.py[co]
113 %{py3_sitescriptdir}/xdg-%{version}-py*.egg-info