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