]> git.pld-linux.org Git - packages/python-pyxdg.git/blame - python-pyxdg.spec
automatic change: use py_build/py_install macros
[packages/python-pyxdg.git] / python-pyxdg.spec
CommitLineData
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
7Summary: Python 2 implementations of freedesktop.org standards
8Summary(pl.UTF-8): Implementacje standardów freedesktop.org w języku Python 2
cf1352fd 9Name: python-%{module}
0a86f25e 10Version: 0.25
d3ceaaeb 11Release: 3
0a86f25e 12License: LGPL v2
e0e7044f 13Group: Libraries/Python
0a86f25e
JB
14Source0: http://people.freedesktop.org/~takluyver/%{module}-%{version}.tar.gz
15# Source0-md5: bedcdb3a0ed85986d40044c87f23477c
cf1352fd 16URL: 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 19BuildRequires: rpm-pythonprov
e63c3a6f 20BuildRequires: rpmbuild(macros) >= 1.219
0a86f25e 21Requires: python-modules
cf1352fd 22BuildArch: noarch
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
0a86f25e 26PyXDG is a Python module to access freedesktop.org standards. The
f7e7e0e2 27package 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 37PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie
38standardó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
48Summary: Python 3 implementations of freedesktop.org standards
49Summary(pl.UTF-8): Implementacje standardów freedesktop.org w języku Python 3
50Group: Libraries/Python
51Requires: python3-modules
52
53%description -n python3-pyxdg
54PyXDG is a Python module to access freedesktop.org standards. The
55package 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
65PyXDG jest modułem języka Python, pozwalającym na wykorzystywanie
66standardó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
90rm -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
112rm -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
This page took 0.145728 seconds and 4 git commands to generate.