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