|
|
e7eac2 |
%if 0%{?fedora}
|
|
|
e7eac2 |
%global with_python3 1
|
|
|
e7eac2 |
%endif
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
|
|
|
e7eac2 |
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
e7eac2 |
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
e7eac2 |
%endif
|
|
|
e7eac2 |
|
|
|
e7eac2 |
Name: python-urwid
|
|
|
e7eac2 |
Version: 1.1.1
|
|
|
445af8 |
Release: 3%{?dist}
|
|
|
e7eac2 |
Summary: Console user interface library
|
|
|
e7eac2 |
|
|
|
e7eac2 |
Group: Development/Libraries
|
|
|
e7eac2 |
License: LGPLv2+
|
|
|
e7eac2 |
URL: http://excess.org/urwid/
|
|
|
e7eac2 |
Source0: http://excess.org/urwid/urwid-%{version}.tar.gz
|
|
|
e7eac2 |
|
|
|
e7eac2 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
|
|
|
e7eac2 |
BuildRequires: python2-devel
|
|
|
e7eac2 |
BuildRequires: python-setuptools-devel
|
|
|
e7eac2 |
BuildRequires: python-twisted-core
|
|
|
e7eac2 |
BuildRequires: pygobject2
|
|
|
e7eac2 |
BuildRequires: python-test
|
|
|
e7eac2 |
# needed by selftest suite for test.support
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
BuildRequires: python3-devel
|
|
|
e7eac2 |
BuildRequires: python3-setuptools
|
|
|
e7eac2 |
BuildRequires: python3-test
|
|
|
e7eac2 |
# needed by selftest suite for test.support
|
|
|
e7eac2 |
BuildRequires: /usr/bin/2to3
|
|
|
e7eac2 |
%endif # if with_python3
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%description
|
|
|
e7eac2 |
Urwid is a Python library for making text console applications. It has
|
|
|
e7eac2 |
many features including fluid interface resizing, support for UTF-8 and
|
|
|
e7eac2 |
CJK encodings, standard and custom text layout modes, simple markup for
|
|
|
e7eac2 |
setting text attributes, and a powerful, dynamic list box that handles a
|
|
|
e7eac2 |
mix of widget types. It is flexible, modular, and leaves the developer in
|
|
|
e7eac2 |
control.
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
%package -n python3-urwid
|
|
|
e7eac2 |
Summary: Urwid console user interface library for Python 3
|
|
|
e7eac2 |
Group: Development/Languages
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%description -n python3-urwid
|
|
|
e7eac2 |
Urwid is a Python library for making text console applications. It has
|
|
|
e7eac2 |
many features including fluid interface resizing, support for UTF-8 and
|
|
|
e7eac2 |
CJK encodings, standard and custom text layout modes, simple markup for
|
|
|
e7eac2 |
setting text attributes, and a powerful, dynamic list box that handles a
|
|
|
e7eac2 |
mix of widget types. It is flexible, modular, and leaves the developer in
|
|
|
e7eac2 |
control.
|
|
|
e7eac2 |
|
|
|
e7eac2 |
This package contains the urwid module built for use with python3.
|
|
|
e7eac2 |
%endif # with_python3
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%prep
|
|
|
e7eac2 |
%setup -q -n urwid-%{version}
|
|
|
e7eac2 |
find urwid -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
|
|
e7eac2 |
find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
rm -rf %{py3dir}
|
|
|
e7eac2 |
cp -a . %{py3dir}
|
|
|
e7eac2 |
%endif # with_python3
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%build
|
|
|
e7eac2 |
CFLAGS="%{optflags}" %{__python} setup.py build
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
pushd %{py3dir}
|
|
|
e7eac2 |
%{__python3} setup.py build
|
|
|
e7eac2 |
popd
|
|
|
e7eac2 |
%endif # with_python3
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%install
|
|
|
e7eac2 |
rm -rf %{buildroot}
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
pushd %{py3dir}
|
|
|
e7eac2 |
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
|
e7eac2 |
popd
|
|
|
e7eac2 |
%endif # with_python3
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%{__python} setup.py install --skip-build --no-compile --root %{buildroot}
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%check
|
|
|
e7eac2 |
python setup.py test
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
pushd %{py3dir}
|
|
|
e7eac2 |
%{__python3} setup.py test
|
|
|
e7eac2 |
popd
|
|
|
e7eac2 |
%endif
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%clean
|
|
|
e7eac2 |
rm -rf %{buildroot}
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%files
|
|
|
e7eac2 |
%defattr(-,root,root,-)
|
|
|
e7eac2 |
%doc CHANGELOG examples docs
|
|
|
e7eac2 |
%{python_sitearch}/urwid
|
|
|
e7eac2 |
%{python_sitearch}/urwid-%{version}*.egg-info
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%if 0%{?with_python3}
|
|
|
e7eac2 |
%files -n python3-urwid
|
|
|
e7eac2 |
%defattr(-,root,root,-)
|
|
|
e7eac2 |
%doc CHANGELOG examples docs
|
|
|
e7eac2 |
%{python3_sitearch}/urwid
|
|
|
e7eac2 |
%{python3_sitearch}/urwid-%{version}*.egg-info
|
|
|
e7eac2 |
%endif
|
|
|
e7eac2 |
|
|
|
e7eac2 |
%changelog
|
|
|
445af8 |
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.1.1-3
|
|
|
445af8 |
- Mass rebuild 2014-01-24
|
|
|
445af8 |
|
|
|
445af8 |
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.1.1-2
|
|
|
445af8 |
- Mass rebuild 2013-12-27
|
|
|
445af8 |
|
|
|
e7eac2 |
* Wed Nov 21 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 1.1.1 -1
|
|
|
e7eac2 |
- Bugfix update
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Tue Oct 23 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 1.1.0-2
|
|
|
e7eac2 |
- Add new docs and examples dir
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Tue Oct 23 2012 Fabian Deutsch <fabiand@fedoraproject.org> - 1.1.0-1
|
|
|
e7eac2 |
- Update to upstream 1.1.0
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Wed Sep 26 2012 Fabian Deutsch <fabian.deutsch@gmx.de> - 1.0.2-1
|
|
|
e7eac2 |
- Update to upstream 1.0.2
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Mon Aug 27 2012 David Malcolm <dmalcolm@redhat.com> - 1.0.0-7
|
|
|
e7eac2 |
- add missing BRs on python-test and python3-test (for test.support)
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Fri Aug 24 2012 David Malcolm <dmalcolm@redhat.com> - 1.0.0-6
|
|
|
e7eac2 |
- remove rhel logic from with_python3 conditional
|
|
|
e7eac2 |
- remove stray references to mako
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.0.0-5
|
|
|
e7eac2 |
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-4
|
|
|
e7eac2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-3
|
|
|
e7eac2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Mon Oct 24 2011 Luke Macken <lmacken@redhat.com> - 1.0.0-2
|
|
|
e7eac2 |
- Add a python3-urwid subpackage (#746627)
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Wed Oct 19 2011 Luke Macken <lmacken@redhat.com> - 1.0.0
|
|
|
e7eac2 |
- Update to version 1.0.0
|
|
|
e7eac2 |
- Add python-setuptools-devel to the BuildRequires
|
|
|
e7eac2 |
- Run the test suite using the setup.py
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9.1-3
|
|
|
e7eac2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Tue Jul 27 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.9.1-2
|
|
|
e7eac2 |
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
|
|
e7eac2 |
|
|
|
e7eac2 |
* Wed May 19 2010 David Cantrell <dcantrell@redhat.com> - 0.9.9.1-1
|
|
|
e7eac2 |
- Initial package
|