e34b854
# Run tests by default
e34b854
%bcond_without tests
e34b854
9072e3a
%global srcname ansi2html
9072e3a
e34b854
Name:       python-%{srcname}
891b22b
Version:    1.8.0
518ab28
Release:    2%{?dist}
c65543e
Summary:    Python module that converts text with ANSI color to HTML
e34b854
# While the project was previously licensed as GPLv3+, it is now LGPLv3.
e34b854
# See https://github.com/pycontribs/ansi2html/issues/72 for more info.
e34b854
# In this issue, all of the previous contributors agreed to relicense their code.
e34b854
# However, the project never removed the GPLv3+ headers from some of the files.
e34b854
License:    LGPLv3
e34b854
URL:        http://github.com/pycontribs/%{srcname}
891b22b
Source:     %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
1a797ec
c65543e
BuildArch:  noarch
9072e3a
3f28a2b
BuildRequires:  python3-devel
e34b854
# Needed for building manpages
e34b854
BuildRequires:  /usr/bin/a2x
946b6bf
e34b854
%global _description %{expand:
e34b854
The ansi2html module can convert text with ANSI color codes to HTML.}
946b6bf
e34b854
%description %{_description}
3f28a2b
e34b854
%package -n python3-%{srcname}
e34b854
Summary:    %{summary}
891b22b
%dnl colorized-logs also provides %{_bindir}/ansi2html and %{_mandir}/man1/ansi2html.1*
891b22b
Conflicts:  colorized-logs
3ecbe17
e34b854
%description -n python3-%{srcname} %_description
3f28a2b
9072e3a
%prep
e34b854
%autosetup -n %{srcname}-%{version} -p1
9072e3a
e34b854
%generate_buildrequires
e34b854
# The -t is set if %%{with_tests} is true
e34b854
%pyproject_buildrequires %{?with_tests:-t}
4dbe980
9072e3a
%build
e34b854
# Build manpages
891b22b
a2x \
891b22b
    --conf-file=man/asciidoc.conf \
891b22b
    --attribute="manual_package=ansi2html" \
891b22b
    --attribute="manual_title=ansi2html Manual" \
891b22b
    --attribute="manual_version=%{version}" \
891b22b
    --format=manpage -D man \
891b22b
     man/ansi2html.1.txt
e34b854
e34b854
# Build wheel
e34b854
%pyproject_wheel
9072e3a
9072e3a
%install
e34b854
%pyproject_install
e34b854
%pyproject_save_files %{srcname}
e34b854
e34b854
# Install manpage
e34b854
install -Dpm 644 man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1
3f28a2b
7c629c5
%check
e34b854
%if %{with tests}
e34b854
%tox
e34b854
%endif
3f28a2b
e34b854
%files -n python3-%{srcname} -f %{pyproject_files}
e34b854
%doc README.rst
e34b854
%license LICENSE
e34b854
%{_bindir}/%{srcname}
e34b854
%{_mandir}/man1/%{srcname}.1*
9072e3a
9072e3a
%changelog
518ab28
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-2
518ab28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
518ab28
891b22b
* Thu Jul 07 2022 Maxwell G <gotmax@e.email> - 1.8.0-1
891b22b
- Update to 1.8.0.
891b22b
6b07338
* Mon Jul 04 2022 Maxwell G <gotmax@e.email> - 1.7.0-1
6b07338
- Update to 1.7.0.
6b07338
- Resolves: rhbz#2103659.
6b07338
2b0f606
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.6.0-6
2b0f606
- Rebuilt for Python 3.11
2b0f606
af0fe09
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-5
af0fe09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
af0fe09
1596944
* Tue Dec 21 2021 Maxwell G <gotmax@e.email> - 1.6.0-4
1596944
- gating.yml (3)
1596944
246da4b
* Sun Dec 19 2021 Maxwell G <gotmax@e.email> - 1.6.0-3
246da4b
- Fix gating.yml test names
246da4b
a432aa7
* Sun Dec 19 2021 Maxwell G <gotmax@e.email> - 1.6.0-2
a432aa7
- Rebuild with fixed gating,yml
a432aa7
e34b854
* Wed Nov 17 2021 Maxwell G <gotmax@e.email> - 1.6.0-1
e34b854
- Update to 1.6.0. Fixes rhbz#1888556.
e34b854
- Implement new Fedora Python Packaging Guidelines.
e34b854
- Fix licensing
e34b854
- Replace mock with unittests.mock and use tox.
e34b854
- Use %%{srcname} globally
e34b854
- Move to new upstream
e34b854
978805f
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-13
978805f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
978805f
4f451ce
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.5.1-12
4f451ce
- Rebuilt for Python 3.10
4f451ce
9f7711d
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-11
9f7711d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
9f7711d
abe8433
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-10
abe8433
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
abe8433
09ae637
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.5.1-9
09ae637
- Rebuilt for Python 3.9
09ae637
09a4924
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-8
09a4924
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
09a4924
27bf376
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.1-7
27bf376
- Rebuilt for Python 3.8.0rc1 (#1748018)
27bf376
d69d48b
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.1-6
d69d48b
- Rebuilt for Python 3.8
d69d48b
9243d99
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-5
9243d99
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9243d99
60dd083
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-4
60dd083
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
60dd083
a205fb5
* Fri Nov 02 2018 Ralph Bean <rbean@redhat.com> - 1.5.1-3
a205fb5
- Bump version to pick up gating.yaml file.
a205fb5
ef60a1d
* Fri Nov 02 2018 Ralph Bean <rbean@redhat.com> - 1.5.1-2
ef60a1d
- Bump version to pick up gating.yaml file.
ef60a1d
7c629c5
* Fri Oct 19 2018 Ralph Bean <rbean@redhat.com> - 1.5.1-1
af46969
- New version
7c629c5
- Dropped python2 subpackage and modernized macros.
7c629c5
7167403
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-8
7167403
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7167403
c99e3f1
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-7
c99e3f1
- Rebuilt for Python 3.7
c99e3f1
ccfb2f3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
ccfb2f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ccfb2f3
4d950a0
* Sat Jan 27 2018 Ralph Bean <rbean@redhat.com> - 1.2.0-5
4d950a0
- Bump to try and trigger automated tests.
4d950a0
5a6e604
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2.0-4
5a6e604
- Update Python 2 dependency declarations to new packaging standards
5a6e604
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
5a6e604
946b6bf
* Wed Aug 09 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.0-3
946b6bf
- Python 2 binary package renamed to python2-ansi2html
946b6bf
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
946b6bf
804076a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
804076a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
804076a
822b10a
* Tue Feb 21 2017 Ralph Bean <rbean@redhat.com> - 1.2.0-1
822b10a
- new version
822b10a
471d7ae
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-4
471d7ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
471d7ae
05f9b8e
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1.1-3
05f9b8e
- Rebuild for Python 3.6
05f9b8e
63099b9
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
63099b9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
63099b9
cb28db2
* Wed Mar 02 2016 Ralph Bean <rbean@redhat.com> - 1.1.1-1
cb28db2
- new version
cb28db2
ebae810
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
ebae810
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ebae810
36e8113
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
36e8113
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
36e8113
704c0b5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
704c0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
704c0b5
99fb641
* Mon Mar 30 2015 Ralph Bean <rbean@redhat.com> - 1.1.0-1
99fb641
- new version
99fb641
5b074a6
* Wed Jan 28 2015 Ralph Bean <rbean@redhat.com> - 1.0.6-6
5b074a6
- Bump spec for testing.
5b074a6
8fd79d0
* Mon Oct 13 2014 Ralph Bean <rbean@redhat.com> - 1.0.6-5
8fd79d0
- Modernized python2 macros.
4dbe980
- Remove any bundled egg-info.
4dbe980
- BR on python2-devel.
8fd79d0
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