]> git.pld-linux.org Git - packages/python-urwid.git/blame - python-urwid.spec
- release 2 (by relup.sh)
[packages/python-urwid.git] / python-urwid.spec
CommitLineData
9f847f08
JB
1#
2# Conditional build:
3%bcond_without doc # docs build
1d225bd0 4%bcond_with tests # test target (fails on builders due to lack of pts)
9f847f08
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
1026538b 8%define module urwid
9f847f08
JB
9Summary: Urwid - a console user interface library for Python 2
10Summary(hu.UTF-8): Urwid egy konzolos felhasználói felület könyvtár Pythonhoz 2
11Summary(pl.UTF-8): Urwid - biblioteka konsolowego interfejsu użytkownika dla Pythona 2
1026538b 12Name: python-%{module}
153a965c 13Version: 2.1.2
792330fc 14Release: 2
9129945d 15License: LGPL v2.1+
1026538b 16Group: Development/Languages/Python
9f847f08
JB
17#Source0Download: http://urwid.org/
18Source0: https://pypi.python.org/packages/source/u/urwid/%{module}-%{version}.tar.gz
153a965c 19# Source0-md5: f7f4e6bed9ba38965dbd619520f39287
9f847f08 20URL: http://urwid.org/
1026538b 21BuildRequires: rpm-pythonprov
9129945d 22BuildRequires: rpmbuild(macros) >= 1.714
9f847f08 23%if %{with python2}
153a965c 24BuildRequires: python-devel >= 1:2.7
9f847f08
JB
25%endif
26%if %{with python3}
153a965c
JP
27BuildRequires: python3-2to3 >= 1:3.5
28BuildRequires: python3-devel >= 1:3.5
9f847f08
JB
29BuildRequires: python3-setuptools
30%endif
31%if %{with doc}
1723e898 32BuildRequires: sphinx-pdg-3 >= 2.0.0
9f847f08 33%endif
153a965c 34Requires: python-modules >= 1:2.7
1026538b
ZU
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38Urwid is a console user interface library for Python.
39
40%description -l hu.UTF-8
41Urwid egy konzolos felhasználói felület könyvtár Pythonhoz.
42
9129945d
JB
43%description -l pl.UTF-8
44Urwid to biblioteka konsolowego interfejsu użytkownika dla Pythona.
45
9f847f08
JB
46%package -n python3-%{module}
47Summary: Urwid - a console user interface library for Python 3
48Summary(hu.UTF-8): Urwid egy konzolos felhasználói felület könyvtár Pythonhoz 3
49Summary(pl.UTF-8): Urwid - biblioteka konsolowego interfejsu użytkownika dla Pythona 3
50Group: Development/Languages/Python
153a965c 51Requires: python3-modules >= 1:3.5
9f847f08
JB
52
53%description -n python3-%{module}
54Urwid is a console user interface library for Python.
55
56%description -n python3-%{module} -l hu.UTF-8
57Urwid egy konzolos felhasználói felület könyvtár Pythonhoz.
58
59%description -n python3-%{module} -l pl.UTF-8
60Urwid to biblioteka konsolowego interfejsu użytkownika dla Pythona.
61
62%package apidocs
63Summary: API documentation for urwid module
64Summary(pl.UTF-8): Dokumentacja API modułu urwid
65Group: Documentation
66
67%description apidocs
68API documentation for urwid module.
69
70%description apidocs -l pl.UTF-8
71Dokumentacja API modułu urwid.
72
1026538b
ZU
73%prep
74%setup -q -n %{module}-%{version}
75
76%build
9f847f08
JB
77%if %{with python2}
78%py_build %{?with_tests:test}
79%endif
80
81%if %{with python3}
82%py3_build %{?with_tests:test}
83%endif
84
85%if %{with doc}
86cd docs
1723e898 87sphinx-build-3 -b html . _html
9f847f08 88%endif
1026538b
ZU
89
90%install
91rm -rf $RPM_BUILD_ROOT
9f847f08
JB
92
93%if %{with python2}
ba5115d6 94%py_install
1026538b 95
1026538b
ZU
96%py_postclean
97
9f847f08
JB
98# tests
99%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/urwid/tests
100%endif
101
102%if %{with python3}
103%py3_install
104
105# tests
106%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/urwid/tests
1d225bd0
JB
107%if %{with tests}
108# unversioned copy installed if tests are run
9f847f08
JB
109%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/urwid.egg-info
110%endif
1d225bd0 111%endif
9f847f08 112
1026538b
ZU
113%clean
114rm -rf $RPM_BUILD_ROOT
115
df43a33b 116%if %{with python2}
1026538b
ZU
117%files
118%defattr(644,root,root,755)
9f847f08 119%doc README.rst docs/changelog.rst
9129945d
JB
120%dir %{py_sitedir}/urwid
121%attr(755,root,root) %{py_sitedir}/urwid/str_util.so
122%{py_sitedir}/urwid/*.py[co]
123%{py_sitedir}/urwid-%{version}-py*.egg-info
df43a33b 124%endif
9f847f08 125
df43a33b 126%if %{with python3}
9f847f08
JB
127%files -n python3-%{module}
128%defattr(644,root,root,755)
129%doc README.rst docs/changelog.rst
130%dir %{py3_sitedir}/urwid
131%attr(755,root,root) %{py3_sitedir}/urwid/str_util.cpython-*.so
132%{py3_sitedir}/urwid/*.py
133%{py3_sitedir}/urwid/__pycache__
134%{py3_sitedir}/urwid-%{version}-py*.egg-info
df43a33b 135%endif
9f847f08
JB
136
137%if %{with doc}
138%files apidocs
139%defattr(644,root,root,755)
140%doc docs/_html/{_images,_static,examples,manual,reference,tutorial,*.html,*.js}
141%endif
This page took 0.167884 seconds and 4 git commands to generate.