2452403
%if 0%{?fedora}
3f28a2b
%global with_python3 1
3f28a2b
%endif
9072e3a
9072e3a
%global srcname ansi2html
9072e3a
c65543e
Name:       python-ansi2html
5819573
Version:    1.0.6
cef8426
Release:    4%{?dist}
c65543e
Summary:    Python module that converts text with ANSI color to HTML
9072e3a
c65543e
Group:      Development/Libraries
c65543e
License:    GPLv3+
c65543e
URL:        http://github.com/ralphbean/ansi2html
c65543e
Source0:    http://pypi.python.org/packages/source/a/ansi2html/ansi2html-%{version}.tar.gz
1a797ec
c65543e
BuildArch:  noarch
9072e3a
3f28a2b
BuildRequires:  python
24ac304
BuildRequires:  python-setuptools
24ac304
BuildRequires:  python-nose
b418c29
BuildRequires:  python-mock
24ac304
BuildRequires:  python-six
3ecbe17
3f28a2b
%if 0%{?with_python3}
3f28a2b
BuildRequires:  python3-devel
3f28a2b
BuildRequires:  python3-setuptools
3f28a2b
BuildRequires:  python3-nose
b418c29
BuildRequires:  python3-mock
3f28a2b
BuildRequires:  python3-six
3f28a2b
%endif
24ac304
e7119cc
%if %{?rhel}%{!?rhel:0} >= 6
e7119cc
BuildRequires:  python-ordereddict
e7119cc
Requires:       python-ordereddict
e7119cc
%endif
3f28a2b
3f28a2b
Requires:   python
cef8426
Requires:   python-setuptools
24ac304
Requires:   python-six
9072e3a
9072e3a
%description
9072e3a
The ansi2html module can convert text with ANSI color codes to HTML.
9072e3a
3f28a2b
%if 0%{?with_python3}
3f28a2b
%package -n python3-ansi2html
3f28a2b
Summary:    Python 3 module that converts text with ANSI color to HTML
3f28a2b
Group:      Development/Libraries
3f28a2b
3ecbe17
%if 0%{?with_python3}
3ecbe17
Requires:   python3
cef8426
Requires:   python3-setuptools
3ecbe17
Requires:   python3-six
3ecbe17
%endif
3ecbe17
3f28a2b
%description -n python3-ansi2html
3f28a2b
The ansi2html module can convert text with ANSI color codes to HTML.
3f28a2b
%endif
3f28a2b
3f28a2b
9072e3a
%prep
9072e3a
%setup -q -n %{srcname}-%{version}
9072e3a
3f28a2b
%if 0%{?with_python3}
3f28a2b
rm -rf %{py3dir}
3f28a2b
cp -a . %{py3dir}
3f28a2b
%endif
3f28a2b
9072e3a
%check
b418c29
%{__python} setup.py test
9072e3a
3f28a2b
%if 0%{?with_python3}
3f28a2b
pushd %{py3dir}
b418c29
%{__python3} setup.py test
3f28a2b
popd
3f28a2b
%endif
9072e3a
9072e3a
%build
9072e3a
%{__python} setup.py build
9072e3a
3f28a2b
%if 0%{?with_python3}
3f28a2b
pushd %{py3dir}
3f28a2b
%{__python3} setup.py build
3f28a2b
popd
3f28a2b
%endif
9072e3a
9072e3a
%install
3f28a2b
%if 0%{?with_python3}
3f28a2b
pushd %{py3dir}
3f28a2b
%{__python3} setup.py install --skip-build --root=%{buildroot}
c65543e
mv %{buildroot}/%{_bindir}/ansi2html %{buildroot}/%{_bindir}/python3-ansi2html
72eecd4
mv %{buildroot}/%{_mandir}/man1/ansi2html.1 %{buildroot}/%{_mandir}/man1/python3-ansi2html.1
3f28a2b
popd
3f28a2b
%endif
3f28a2b
c65543e
%{__python} setup.py install --skip-build --root=%{buildroot}
c65543e
3f28a2b
9072e3a
%files
9072e3a
%doc LICENSE README.rst
c65543e
%{python_sitelib}/ansi2html
c65543e
%{python_sitelib}/ansi2html-%{version}-*
9072e3a
%{_bindir}/ansi2html
72eecd4
%{_mandir}/man1/ansi2html*
9072e3a
3f28a2b
%if 0%{?with_python3}
3f28a2b
%files -n python3-ansi2html
3f28a2b
%doc LICENSE README.rst
c65543e
%{python3_sitelib}/ansi2html
c65543e
%{python3_sitelib}/ansi2html-%{version}-*
c65543e
%{_bindir}/python3-ansi2html
72eecd4
%{_mandir}/man1/python3-ansi2html*
3f28a2b
%endif
3f28a2b
9072e3a
9072e3a
%changelog
cef8426
* Wed Aug 27 2014 Ralph Bean <rbean@redhat.com> - 1.0.6-4
cef8426
- Added explicit dependency on python(3)-setuptools.
cef8426
81cdf3d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-3
81cdf3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
81cdf3d
f4a3bbb
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.6-2
f4a3bbb
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
f4a3bbb
5819573
* Tue Jan 28 2014 Ralph Bean <rbean@redhat.com> - 1.0.6-1
5819573
- Latest upstream.
5819573
8f6e52e
* Sat Oct 12 2013 Ralph Bean <rbean@redhat.com> - 1.0.5-1
8f6e52e
- Latest upstream with configurable color scheme.
8f6e52e
afa5eda
* Sat Oct 12 2013 Ralph Bean <rbean@redhat.com> - 1.0.3-1
afa5eda
- Latest upstream with a tweak to setup.py
afa5eda
72eecd4
* Fri Oct 04 2013 Ralph Bean <rbean@redhat.com> - 1.0.2-1
72eecd4
- Latest upstream.
72eecd4
- Manpages now included.
72eecd4
771bb72
* Thu Sep 26 2013 Ralph Bean <rbean@redhat.com> - 0.10.0-3
771bb72
- Latest upstream with a superior internal state model thanks to Sebastian
771bb72
  Pipping.
771bb72
39eaa7f
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
39eaa7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
39eaa7f
2452403
* Tue Mar 26 2013 Ralph Bean <rbean@redhat.com> - 0.9.4-2
2452403
- Removed python3 rhel conditional.
2452403
26e3907
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 0.9.4-1
26e3907
- Latest upstream fixes encoding issues.
26e3907
bda58c5
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
bda58c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bda58c5
8eaa144
* Wed Sep 26 2012 Ralph Bean <rbean@redhat.com> - 0.9.2-1
8eaa144
- New upstream
8eaa144
- Fixes dict ordering issues.
8eaa144
- Solves some encoding issues.
8eaa144
1a797ec
* Mon Aug  6 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.1-8
1a797ec
- fix dict ordering issues
1a797ec
f8e79fb
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.1-7
f8e79fb
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
f8e79fb
95e63b0
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-6
95e63b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
95e63b0
b418c29
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.1-5
b418c29
- Re-enabled tests.
1da3c75
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.1-4
1da3c75
- Temporarily removed both sets of tests until python-mock problems are sorted
1da3c75
  out.
e7119cc
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.1-3
e7119cc
- Temporarily removed python3 tests until python3-mock is available.
e7119cc
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.1-2
e7119cc
- Added requirements python-mock and python-ordereddict.
12765a5
* Mon Jul 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.1-1
12765a5
- Latest upstream version.
3ecbe17
* Tue Jun 26 2012 Ralph Bean <rbean@redhat.com> - 0.9.0-4
3ecbe17
- Only Require python3 for python3-ansi2html.
c65543e
* Wed May 23 2012 Ralph Bean <rbean@redhat.com> - 0.9.0-3
c65543e
- Fix executable python2/python3 confusion.
c65543e
- More explicit ownership of dirs in python_sitelib.
c65543e
- Removed mixed use of tabs and spaces.
3f28a2b
* Wed May 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.0-2
3f28a2b
- python3 support.
24ac304
* Wed May 09 2012 Ralph Bean <rbean@redhat.com> - 0.9.0-1
24ac304
- Packaged latest upstream version.
24ac304
- Removed unnecessary defattr and buildroot
24ac304
- New dependency on python-six
9072e3a
* Fri Feb 3 2012 Ralph Bean <rbean@redhat.com> - 0.8.3-1
9072e3a
- Included tests in check section.
9072e3a
- More concise file ownership declarations.
9072e3a
- Resolved license ambiguity in upstream.
9072e3a
- Removed shebang from non-executable file.
9072e3a
* Mon Jan 30 2012 Ralph Bean <rbean@redhat.com> - 0.8.2-1
9072e3a
- Updated ansi2html version to latest 0.8.2.
9072e3a
- Added _bindir entry for the ansi2html console-script.
9072e3a
- Removed dependency on genshi.
9072e3a
- Removed references to now EOL fedora 12.
9072e3a
* Wed Sep 15 2010 Ralph Bean <ralph.bean@gmail.com> - 0.5.2-1
9072e3a
- Updated spec based on comments from Mark McKinstry
9072e3a
* Tue Sep 7 2010 Ralph Bean <ralph.bean@gmail.com> - 0.5.1-1
9072e3a
- Initial RPM packaging
9072e3a