]> git.pld-linux.org Git - packages/python-pyxdg.git/blob - python-pyxdg.spec
rebuild with python 3.10
[packages/python-pyxdg.git] / python-pyxdg.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (few failing)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  pyxdg
8 Summary:        Python 2 implementations of freedesktop.org standards
9 Summary(pl.UTF-8):      Implementacje standardów freedesktop.org w języku Python 2
10 Name:           python-%{module}
11 Version:        0.27
12 Release:        3
13 License:        LGPL v2
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pyxdg/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pyxdg/%{module}-%{version}.tar.gz
17 # Source0-md5:  2a2844c21b1b038d74433a0c4aef0a88
18 URL:            https://freedesktop.org/wiki/Software/pyxdg/
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
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 Requires:       python-modules >= 1:2.7
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 PyXDG is a Python module to access freedesktop.org standards. The
41 package contains:
42
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
49
50 %description -l pl.UTF-8
51 PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie
52 standardów freedesktop.org. Pakiet zawiera:
53
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
65 Requires:       python3-modules >= 1:3.2
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
88
89 %prep
90 %setup -q -n %{module}-%{version}
91
92 %build
93 %if %{with python2}
94 %py_build
95
96 %if %{with tests}
97 nosetests-%{py_ver} test
98 %endif
99 %endif
100
101 %if %{with python3}
102 %py3_build
103
104 %if %{with tests}
105 nosetests-%{py3_ver} test
106 %endif
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %py_install
114
115 %py_postclean
116 %endif
117
118 %if %{with python3}
119 %py3_install
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %files
127 %defattr(644,root,root,755)
128 %doc AUTHORS ChangeLog README TODO
129 %dir %{py_sitescriptdir}/xdg
130 %{py_sitescriptdir}/xdg/*.py[co]
131 %{py_sitescriptdir}/pyxdg-%{version}-py*.egg-info
132 %endif
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
This page took 0.103544 seconds and 3 git commands to generate.