]> git.pld-linux.org Git - packages/python-xdg.git/blob - python-xdg.spec
- new; main module renamed to xdgenv to avoid namespace conflict with pyxdg module
[packages/python-xdg.git] / python-xdg.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 Summary:        Variables defined by the XDG Base Directory Specification
7 Summary(pl.UTF-8):      Zmienne zdefiniowane w specyfikacji XDG Base Directory
8 Name:           python-xdg
9 Version:        1.0.7
10 Release:        1
11 License:        MIT
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules >= 1:3.2
24 BuildRequires:  python3-setuptools
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python-modules >= 1:2.5
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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
37 dependencies.
38
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.
45
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
51
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
57 dependencies.
58
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.
65
66 %prep
67 %setup -q -n xdg-%{version}
68
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.
71 %patch0 -p1
72 %{__mv} xdg.py xdgenv.py
73
74 %build
75 %if %{with python2}
76 %py_build
77 %endif
78
79 %if %{with python3}
80 %py3_build
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
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
105 %endif
106
107 %if %{with python3}
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
114 %endif
This page took 0.070576 seconds and 3 git commands to generate.