ab0d25
# when bootstrapping, we cannot yet use sphinx and pytest
ab0d25
%bcond_without docs
ab0d25
%bcond_without tests
ab0d25
ab0d25
Name:           python-pygments
ab0d25
Version:        2.7.4
ab0d25
Release:        4%{?dist}
ab0d25
Summary:        Syntax highlighting engine written in Python
ab0d25
ab0d25
License:        BSD
ab0d25
URL:            https://pygments.org/
ab0d25
ab0d25
# One of the examples has a questionable licence clause, see:
ab0d25
#   https://github.com/pygments/pygments/issues/1831
ab0d25
# To obtain a cleaned-up tarball, run:
ab0d25
#   $ ./get-clean-tarball.sh
ab0d25
Source0:        Pygments-%{version}-clean.tar.xz
ab0d25
Source1:        get-clean-tarball.sh
ab0d25
ab0d25
BuildArch:      noarch
ab0d25
ab0d25
%global _description %{expand:
ab0d25
Pygments is a generic syntax highlighter for general use in all kinds
ab0d25
of software such as forum systems, wikis or other applications that
ab0d25
need to prettify source code. Highlights are:
ab0d25
ab0d25
  * a wide range of common languages and markup formats is supported
ab0d25
  * special attention is paid to details that increase highlighting
ab0d25
    quality
ab0d25
  * support for new languages and formats are added easily; most
ab0d25
    languages use a simple regex-based lexing mechanism
ab0d25
  * a number of output formats is available, among them HTML, RTF,
ab0d25
    LaTeX and ANSI sequences
ab0d25
  * it is usable as a command-line tool and as a library
ab0d25
  * ... and it highlights even Brainf*ck!}
ab0d25
ab0d25
%description %_description
ab0d25
ab0d25
%package -n python%{python3_pkgversion}-pygments
ab0d25
BuildRequires:  python%{python3_pkgversion}-devel
ab0d25
BuildRequires:  pyproject-rpm-macros
ab0d25
%if %{with tests}
ab0d25
BuildRequires:  make
ab0d25
BuildRequires:  python%{python3_pkgversion}-pytest
ab0d25
%endif
ab0d25
%if %{with docs}
ab0d25
BuildRequires:  python%{python3_pkgversion}-sphinx
ab0d25
%endif
ab0d25
Summary:        Syntax highlighting engine written in Python
ab0d25
%{?python_provide:%python_provide python%{python3_pkgversion}-pygments}
ab0d25
ab0d25
%description -n python%{python3_pkgversion}-pygments %_description
ab0d25
ab0d25
%prep
ab0d25
%autosetup -p1 -n Pygments-%{version}
ab0d25
ab0d25
%generate_buildrequires
ab0d25
%pyproject_buildrequires
ab0d25
ab0d25
%build
ab0d25
sed -i 's/\r//' LICENSE
ab0d25
%pyproject_wheel
ab0d25
ab0d25
%install
ab0d25
%pyproject_install
ab0d25
%pyproject_save_files pygments
ab0d25
ab0d25
%if %{with docs}
ab0d25
%{python3} setup.py build_sphinx
ab0d25
rm -rf build/sphinx/html/.buildinfo
ab0d25
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
ab0d25
chmod -x %{buildroot}%{_mandir}/man1/*.1
ab0d25
%endif
ab0d25
cp -r doc/docs doc/reST
ab0d25
ab0d25
ab0d25
%if %{with tests}
ab0d25
%check
ab0d25
make test PYTHON=%{python3}
ab0d25
%endif
ab0d25
ab0d25
ab0d25
%files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
ab0d25
%doc AUTHORS CHANGES doc/reST
ab0d25
%license LICENSE
ab0d25
%{_bindir}/pygmentize
ab0d25
%if %{with docs}
ab0d25
%lang(en) %{_mandir}/man1/pygmentize.1*
ab0d25
%doc build/sphinx/html
ab0d25
%endif
ab0d25
ab0d25
%changelog
ab0d25
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.4-4
ab0d25
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
ab0d25
  Related: rhbz#1991688
ab0d25
ab0d25
* Thu Jun 03 2021 Petr Viktorin <pviktori@redhat.com> - 2.7.4-3
ab0d25
- Remove test files with a no-nuclear license from the sources
ab0d25
- Related: rhbz#1950291
ab0d25
ab0d25
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.7.4-2
ab0d25
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
ab0d25
ab0d25
* Fri Jan 29 12:41:43 CET 2021 Tomas Hrnciar <thrnciar@redhat.com> - 2.7.4-1
ab0d25
- Update to 2.7.4
ab0d25
ab0d25
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.2-2
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ab0d25
ab0d25
* Wed Nov 25 2020 Petr Viktorin <pviktori@redhat.com> - 2.7.2-1
ab0d25
- Update to 2.7.2
ab0d25
ab0d25
* Mon Oct 12 2020 Tomas Hrnciar <thrnciar@redhat.com> - 2.7.1-1
ab0d25
- Update to 2.7.1
ab0d25
ab0d25
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-4
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ab0d25
ab0d25
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-3
ab0d25
- Rebuilt for Python 3.9
ab0d25
ab0d25
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-2
ab0d25
- Bootstrap for Python 3.9
ab0d25
ab0d25
* Tue May 19 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-1
ab0d25
- Update to 2.6.1 (#1776922)
ab0d25
ab0d25
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-7
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ab0d25
ab0d25
* Fri Nov 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-6
ab0d25
- Subpackage python2-pygments has been removed
ab0d25
  See https://fedoraproject.org/wiki/Changes/RetirePython2
ab0d25
ab0d25
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-5
ab0d25
- Rebuilt for Python 3.8.0rc1 (#1748018)
ab0d25
ab0d25
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-4
ab0d25
- Rebuilt for Python 3.8
ab0d25
ab0d25
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-3
ab0d25
- Bootstrap for Python 3.8
ab0d25
ab0d25
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ab0d25
ab0d25
* Wed Jul 10 2019 Kevin Fenzi <kevin@scrye.com> - 2.4.2-1
ab0d25
- Update to 2.4.2. Fixes bug #1707945
ab0d25
ab0d25
* Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.1-1
ab0d25
- Update to 2.3.1
ab0d25
ab0d25
* Mon Mar 11 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.0-17
ab0d25
- Use python3-sphinx to build docs
ab0d25
ab0d25
* Tue Feb 26 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.0-16
ab0d25
- Add missing setuptools Requires
ab0d25
ab0d25
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-15
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ab0d25
ab0d25
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-14
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ab0d25
ab0d25
* Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-13
ab0d25
- Run tests
ab0d25
- Add fix for 3.7
ab0d25
ab0d25
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-12
ab0d25
- Rebuilt for Python 3.7
ab0d25
ab0d25
* Mon Mar 19 2018 Steve Milner <smilner@redhat.com> - 2.2.0-11
ab0d25
- Added import-directive.patch to work around a change in sphinx.
ab0d25
ab0d25
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-10
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ab0d25
ab0d25
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.2.0-9
ab0d25
- Cleanup spec file conditionals
ab0d25
ab0d25
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ab0d25
ab0d25
* Thu Mar 23 2017 Steve Milner <smilner@redhat.com> - 2.2.0-7
ab0d25
- Fixed python2 sitelib in files section.
ab0d25
ab0d25
* Wed Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-6
ab0d25
- Dropped python26 support.
ab0d25
- Spec clean up
ab0d25
ab0d25
* Mon Mar 20 2017 Steve Milner <smilner@redhat.com> - 2.2.0-5
ab0d25
- Updated for standards per BZ#1433650
ab0d25
ab0d25
* Mon Mar  6 2017 Steve Milner <smilner@redhat.com> - 2.2.0-4
ab0d25
- Added conflict per BZ#1429075
ab0d25
ab0d25
* Mon Mar  6 2017 Steve Milner <smilner@redhat.com> - 2.2.0-3
ab0d25
- Python3 package now houses the pygmentize binary
ab0d25
- Fixed Source0 url to point to pypi.org
ab0d25
- Made python3-nose a hard BuildRequirement for python3
ab0d25
ab0d25
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.2.0-2
ab0d25
- Update bin to come back into line with Fedora standards
ab0d25
ab0d25
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.2.0-1
ab0d25
- Update for upstream release.
ab0d25
ab0d25
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.1.3-5
ab0d25
- Split bin between versions.
ab0d25
ab0d25
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-4
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ab0d25
ab0d25
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.1.3-3
ab0d25
- Rebuild for Python 3.6
ab0d25
- Don't make rpmbuild fail on failed tests for now
ab0d25
ab0d25
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-2
ab0d25
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ab0d25
ab0d25
* Fri Mar  4 2016 Steve Milner <smilner@redhat.com> - 2.1.3-1
ab0d25
- Update for upstream release.
ab0d25
ab0d25
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-5
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ab0d25
ab0d25
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-4
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
ab0d25
ab0d25
* Thu Oct 29 2015 Steve Milner <smilner@redhat.com> - 2.0.2-3
ab0d25
- Backport patch to fix font manager shell injection for BZ#1276321
ab0d25
ab0d25
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.0.2-2
ab0d25
- Rebuilt for Python3.5 rebuild
ab0d25
- Also remove python3-sphinx from BR as docs are built only with python2-sphinx
ab0d25
ab0d25
* Mon Aug 24 2015 Steve Milner <smilner@redhat.com> - 2.0.2-1
ab0d25
- update for upstream release.
ab0d25
- Added python-pygments/python3-pygments to BuildRequires.
ab0d25
ab0d25
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ab0d25
ab0d25
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-3
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ab0d25
ab0d25
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-2
ab0d25
- Rebuild for Python 3.4
ab0d25
ab0d25
* Tue Nov 26 2013 Steve Milner <smilner@fedoraproject.org> - 1.6-1
ab0d25
- update for upstream release.
ab0d25
ab0d25
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-9
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ab0d25
ab0d25
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-8
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ab0d25
ab0d25
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-7
ab0d25
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
ab0d25
ab0d25
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-6
ab0d25
- remove rhel logic from with_python3 conditional
ab0d25
ab0d25
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ab0d25
ab0d25
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ab0d25
ab0d25
* Tue Sep 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-3
ab0d25
- Really enable the python3 unittests.
ab0d25
- Fix python26 byte compilation (thanks to Jeffrey Ness)
ab0d25
ab0d25
* Sat Sep 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
ab0d25
- Fix python main package having dependencies for the python2.6 subpackage
ab0d25
- Fix places that used the default python instead of python26
ab0d25
- Attempt to make byte compilation more robust in case we add python3 to EPEL5
ab0d25
- Run unittests on python3 in F15+
ab0d25
ab0d25
* Fri Jun 24 2011 Steve Milner <smilner@fedoraproject.org> - 1.4-1
ab0d25
- update for upstream release
ab0d25
- Add python2.6 support done by Steve Traylen <steve.traylen@cern.ch>. BZ#662755.
ab0d25
ab0d25
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-8
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ab0d25
ab0d25
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
ab0d25
- update to most recent python guidelines
ab0d25
- rebuild with python3.2
ab0d25
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
ab0d25
ab0d25
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
ab0d25
ab0d25
* Thu May  6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5
ab0d25
- Enforce that Pygments requires Python 2.4 or later via an explicit BR
ab0d25
- Minor tweaks to spec file
ab0d25
- Deliver html and reST doc files to specifically named directories
ab0d25
- Align description with that of http://pygments.org/
ab0d25
- Add %%check section for Python2 and add BR on python-nose
ab0d25
ab0d25
* Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4
ab0d25
- switched with_python3 back to 1
ab0d25
ab0d25
* Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3
ab0d25
- add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now
ab0d25
ab0d25
* Tue Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2
ab0d25
- added python-imaging as a dependency per BZ#581663.
ab0d25
ab0d25
* Sat Mar  6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
ab0d25
- Updated for release.
ab0d25
ab0d25
* Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1
ab0d25
- Updated for release.
ab0d25
ab0d25
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ab0d25
ab0d25
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
ab0d25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ab0d25
ab0d25
* Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3
ab0d25
- Updated for release.
ab0d25
ab0d25
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2
ab0d25
- Rebuild for Python 2.6
ab0d25
ab0d25
* Thu Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1
ab0d25
- Updated for upstream 1.0.
ab0d25
ab0d25
* Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1
ab0d25
- Updated for upstream 0.11.
ab0d25
ab0d25
* Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1
ab0d25
- Updated for upstream 0.10.
ab0d25
ab0d25
* Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2
ab0d25
- Added python-setuptools as a Requires per bz#403601.
ab0d25
ab0d25
* Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1
ab0d25
- Updated for upstream 0.9.
ab0d25
ab0d25
* Fri Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2
ab0d25
- Removed the dos2unix build dependency.
ab0d25
ab0d25
* Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1
ab0d25
- Initial packaging for Fedora.