e6c2fea
# when bootstrapping, we cannot yet use sphinx and pytest
cd10e9b
%bcond_without docs
e6c2fea
%bcond_without tests
dda3115
dda3115
Name:           python-pygments
b6614ab
Version:        2.7.2
987ed3b
Release:        1%{?dist}
e6c2fea
Summary:        Syntax highlighting engine written in Python
dda3115
dda3115
License:        BSD
e6c2fea
URL:            https://pygments.org/
e6c2fea
Source0:        %{pypi_source Pygments %{version}}
cd10e9b
dda3115
BuildArch:      noarch
259afea
e6c2fea
%global _description %{expand:
b41b822
Pygments is a generic syntax highlighter for general use in all kinds
b41b822
of software such as forum systems, wikis or other applications that
b41b822
need to prettify source code. Highlights are:
e673595
b41b822
  * a wide range of common languages and markup formats is supported
b41b822
  * special attention is paid to details that increase highlighting
b41b822
    quality
b41b822
  * support for new languages and formats are added easily; most
b41b822
    languages use a simple regex-based lexing mechanism
b41b822
  * a number of output formats is available, among them HTML, RTF,
b41b822
    LaTeX and ANSI sequences
b41b822
  * it is usable as a command-line tool and as a library
e6c2fea
  * ... and it highlights even Brainf*ck!}
b41b822
e6c2fea
%description %_description
b41b822
8ff7f90
%package -n python%{python3_pkgversion}-pygments
8ff7f90
BuildRequires:  python%{python3_pkgversion}-devel
987ed3b
BuildRequires:  pyproject-rpm-macros
e6c2fea
%if %{with tests}
8ff7f90
BuildRequires:  python%{python3_pkgversion}-pytest
e6c2fea
%endif
cd10e9b
%if %{with docs}
8ff7f90
BuildRequires:  python%{python3_pkgversion}-sphinx
cd10e9b
%endif
e6c2fea
Summary:        Syntax highlighting engine written in Python
8ff7f90
%{?python_provide:%python_provide python%{python3_pkgversion}-pygments}
dda3115
8ff7f90
%description -n python%{python3_pkgversion}-pygments %_description
dda3115
b41b822
%prep
e6c2fea
%autosetup -p1 -n Pygments-%{version}
59ce0a5
987ed3b
%generate_buildrequires
987ed3b
%pyproject_buildrequires
987ed3b
dda3115
%build
e6c2fea
sed -i 's/\r//' LICENSE
987ed3b
%pyproject_wheel
b41b822
dda3115
%install
987ed3b
%pyproject_install
987ed3b
%pyproject_save_files pygments
cd10e9b
cd10e9b
%if %{with docs}
e6c2fea
%{python3} setup.py build_sphinx
e6c2fea
rm -rf build/sphinx/html/.buildinfo
cd10e9b
install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
e6c2fea
chmod -x %{buildroot}%{_mandir}/man1/*.1
b41b822
%endif
cd10e9b
cp -r doc/docs doc/reST
cd10e9b
e673595
e6c2fea
%if %{with tests}
59ce0a5
%check
e6c2fea
make test PYTHON=%{python3}
e6c2fea
%endif
59ce0a5
1e0e5cb
987ed3b
%files -n python%{python3_pkgversion}-pygments -f %{pyproject_files}
e6c2fea
%doc AUTHORS CHANGES doc/reST
c301864
%license LICENSE
c6c2cd0
%{_bindir}/pygmentize
cd10e9b
%if %{with docs}
c301864
%lang(en) %{_mandir}/man1/pygmentize.1*
cd10e9b
%doc build/sphinx/html
b41b822
%endif
Steve Milner 612557d
dda3115
%changelog
b6614ab
* Wed Nov 25 2020 Petr Viktorin <pviktori@redhat.com> - 2.7.2-1
b6614ab
- Update to 2.7.2
b6614ab
987ed3b
* Mon Oct 12 2020 Tomas Hrnciar <thrnciar@redhat.com> - 2.7.1-1
987ed3b
- Update to 2.7.1
987ed3b
d5a1b4e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-4
d5a1b4e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d5a1b4e
505df81
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-3
505df81
- Rebuilt for Python 3.9
505df81
1e6ddaa
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-2
1e6ddaa
- Bootstrap for Python 3.9
1e6ddaa
e6c2fea
* Tue May 19 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-1
e6c2fea
- Update to 2.6.1 (#1776922)
e6c2fea
4b14055
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-7
4b14055
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4b14055
e2a8ab7
* Fri Nov 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-6
e2a8ab7
- Subpackage python2-pygments has been removed
e2a8ab7
  See https://fedoraproject.org/wiki/Changes/RetirePython2
e2a8ab7
0989d90
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-5
0989d90
- Rebuilt for Python 3.8.0rc1 (#1748018)
0989d90
f54b778
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-4
f54b778
- Rebuilt for Python 3.8
f54b778
67618b5
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-3
67618b5
- Bootstrap for Python 3.8
67618b5
b123430
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
b123430
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b123430
4c307df
* Wed Jul 10 2019 Kevin Fenzi <kevin@scrye.com> - 2.4.2-1
4c307df
- Update to 2.4.2. Fixes bug #1707945
4c307df
cd10e9b
* Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.1-1
cd10e9b
- Update to 2.3.1
cd10e9b
3c52adc
* Mon Mar 11 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.0-17
3c52adc
- Use python3-sphinx to build docs
3c52adc
a85018f
* Tue Feb 26 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.0-16
a85018f
- Add missing setuptools Requires
a85018f
ffae523
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-15
ffae523
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ffae523
0cd9290
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-14
0cd9290
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0cd9290
dc90bb3
* Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-13
dc90bb3
- Run tests
dc90bb3
- Add fix for 3.7
dc90bb3
559be8f
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-12
559be8f
- Rebuilt for Python 3.7
559be8f
d1e39a9
* Mon Mar 19 2018 Steve Milner <smilner@redhat.com> - 2.2.0-11
d1e39a9
- Added import-directive.patch to work around a change in sphinx.
d1e39a9
ba38cba
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-10
ba38cba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ba38cba
8827467
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.2.0-9
8827467
- Cleanup spec file conditionals
8827467
4f0bbce
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
4f0bbce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4f0bbce
133c2ac
* Thu Mar 23 2017 Steve Milner <smilner@redhat.com> - 2.2.0-7
f280693
- Fixed python2 sitelib in files section.
f280693
c301864
* Wed Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-6
c301864
- Dropped python26 support.
c301864
- Spec clean up
c301864
b41b822
* Mon Mar 20 2017 Steve Milner <smilner@redhat.com> - 2.2.0-5
b41b822
- Updated for standards per BZ#1433650
b41b822
259afea
* Mon Mar  6 2017 Steve Milner <smilner@redhat.com> - 2.2.0-4
259afea
- Added conflict per BZ#1429075
259afea
46f1f96
* Mon Mar  6 2017 Steve Milner <smilner@redhat.com> - 2.2.0-3
e673595
- Python3 package now houses the pygmentize binary
e673595
- Fixed Source0 url to point to pypi.org
e673595
- Made python3-nose a hard BuildRequirement for python3
c6c2cd0
46f1f96
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.2.0-2
46f1f96
- Update bin to come back into line with Fedora standards
46f1f96
1eed53e
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.2.0-1
1eed53e
- Update for upstream release.
1eed53e
e469539
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.1.3-5
e469539
- Split bin between versions.
e469539
92e79c4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-4
92e79c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
92e79c4
88102ef
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.1.3-3
88102ef
- Rebuild for Python 3.6
88102ef
- Don't make rpmbuild fail on failed tests for now
88102ef
2617461
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-2
2617461
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2617461
41198a3
* Fri Mar  4 2016 Steve Milner <smilner@redhat.com> - 2.1.3-1
41198a3
- Update for upstream release.
41198a3
ebc339e
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-5
ebc339e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ebc339e
d348f0b
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-4
d348f0b
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
d348f0b
49bae42
* Thu Oct 29 2015 Steve Milner <smilner@redhat.com> - 2.0.2-3
49bae42
- Backport patch to fix font manager shell injection for BZ#1276321
49bae42
Robert Kuska d1b3ff2
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.0.2-2
Robert Kuska d1b3ff2
- Rebuilt for Python3.5 rebuild
Robert Kuska cd9c28b
- Also remove python3-sphinx from BR as docs are built only with python2-sphinx
Robert Kuska d1b3ff2
3a11b6c
* Mon Aug 24 2015 Steve Milner <smilner@redhat.com> - 2.0.2-1
3a11b6c
- update for upstream release.
71f1637
- Added python-pygments/python3-pygments to BuildRequires.
3a11b6c
fabe34d
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
fabe34d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
fabe34d
2ad1302
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-3
2ad1302
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2ad1302
Orion Poplawski a318732
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-2
Orion Poplawski a318732
- Rebuild for Python 3.4
Orion Poplawski a318732
Steve Milner f615406
* Tue Nov 26 2013 Steve Milner <smilner@fedoraproject.org> - 1.6-1
Steve Milner f615406
- update for upstream release.
Steve Milner f615406
74988a4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-9
74988a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
74988a4
a230abb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-8
a230abb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a230abb
bfd5744
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-7
bfd5744
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
bfd5744
e5729ad
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-6
e5729ad
- remove rhel logic from with_python3 conditional
e5729ad
ee01497
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
ee01497
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ee01497
bc9f2d5
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
bc9f2d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
bc9f2d5
1e0e5cb
* Tue Sep 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-3
1e0e5cb
- Really enable the python3 unittests.
1e0e5cb
- Fix python26 byte compilation (thanks to Jeffrey Ness)
1e0e5cb
63ac05e
* Sat Sep 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
63ac05e
- Fix python main package having dependencies for the python2.6 subpackage
63ac05e
- Fix places that used the default python instead of python26
63ac05e
- Attempt to make byte compilation more robust in case we add python3 to EPEL5
63ac05e
- Run unittests on python3 in F15+
63ac05e
Steve Milner 612557d
* Fri Jun 24 2011 Steve Milner <smilner@fedoraproject.org> - 1.4-1
Steve Milner 612557d
- update for upstream release
Steve Milner 612557d
- Add python2.6 support done by Steve Traylen <steve.traylen@cern.ch>. BZ#662755.
Steve Milner 612557d
0630807
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-8
0630807
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0630807
5a670f8
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
5a670f8
- update to most recent python guidelines
5a670f8
- rebuild with python3.2
5a670f8
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
5a670f8
070d6a2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6
070d6a2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
070d6a2
59ce0a5
* Thu May  6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5
59ce0a5
- Enforce that Pygments requires Python 2.4 or later via an explicit BR
59ce0a5
- Minor tweaks to spec file
59ce0a5
- Deliver html and reST doc files to specifically named directories
59ce0a5
- Align description with that of http://pygments.org/
59ce0a5
- Add %%check section for Python2 and add BR on python-nose
59ce0a5
d30218c
* Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4
d30218c
- switched with_python3 back to 1
d30218c
9faf8bd
* Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3
9faf8bd
- add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now
9faf8bd
3a11b6c
* Tue Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2
71d2ba9
- added python-imaging as a dependency per BZ#581663.
71d2ba9
42e427b
* Sat Mar  6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
42e427b
- Updated for release.
42e427b
7172f0e
* Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1
7172f0e
- Updated for release.
7172f0e
2cffb5c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
2cffb5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2cffb5c
4f4cb1f
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
4f4cb1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4f4cb1f
68fa276
* Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3
68fa276
- Updated for release.
68fa276
667fe57
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2
667fe57
- Rebuild for Python 2.6
667fe57
3a11b6c
* Thu Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1
56a4fd6
- Updated for upstream 1.0.
56a4fd6
fb080f0
* Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1
fb080f0
- Updated for upstream 0.11.
fb080f0
f99f1e3
* Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1
f99f1e3
- Updated for upstream 0.10.
f99f1e3
9c90438
* Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2
9c90438
- Added python-setuptools as a Requires per bz#403601.
9c90438
f57f1d0
* Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1
f57f1d0
- Updated for upstream 0.9.
f57f1d0
3a11b6c
* Fri Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2
6f95155
- Removed the dos2unix build dependency.
f57f1d0
dda3115
* Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1
dda3115
- Initial packaging for Fedora.