244595
%global upstream_name Pygments
244595
%global srcname pygments
244595
%global sum Syntax highlighting engine written in Python
244595
%if 0%{?fedora} || 0%{?rhel} > 7
244595
%global with_python3 1
244595
%endif
244595
244595
%if 0%{?rhel} > 7
244595
# Disable python2 build by default
244595
%bcond_with python2
244595
%else
244595
%bcond_without python2
244595
%endif
244595
244595
Name:           python-pygments
244595
Version:        2.2.0
244595
Release:        12%{?dist}
244595
Summary:        %{sum}
244595
244595
License:        BSD
244595
URL:            http://pygments.org/
244595
Source0:        https://pypi.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
244595
Patch0:         import-directive.patch
244595
BuildArch:      noarch
244595
244595
%description
244595
Pygments is a generic syntax highlighter for general use in all kinds
244595
of software such as forum systems, wikis or other applications that
244595
need to prettify source code. Highlights are:
244595
244595
  * a wide range of common languages and markup formats is supported
244595
  * special attention is paid to details that increase highlighting
244595
    quality
244595
  * support for new languages and formats are added easily; most
244595
    languages use a simple regex-based lexing mechanism
244595
  * a number of output formats is available, among them HTML, RTF,
244595
    LaTeX and ANSI sequences
244595
  * it is usable as a command-line tool and as a library
244595
  * ... and it highlights even Brainf*ck!
244595
244595
%if %{with python2}
244595
%package -n python2-%{srcname}
244595
BuildRequires:  python%{?fedora:2}-devel >= 2.4, python%{?fedora:2}-setuptools
244595
BuildRequires:  python%{?fedora:2}-nose, python%{?fedora:2}-sphinx
244595
Summary:        %{sum}
244595
%{?python_provide:%python_provide python2-%{srcname}}
244595
244595
%description -n python2-%{srcname}
244595
Pygments is a generic syntax highlighter for general use in all kinds
244595
of software such as forum systems, wikis or other applications that
244595
need to prettify source code. Highlights are:
244595
244595
  * a wide range of common languages and markup formats is supported
244595
  * special attention is paid to details that increase highlighting
244595
    quality
244595
  * support for new languages and formats are added easily; most
244595
    languages use a simple regex-based lexing mechanism
244595
  * a number of output formats is available, among them HTML, RTF,
244595
    LaTeX and ANSI sequences
244595
  * it is usable as a command-line tool and as a library
244595
  * ... and it highlights even Brainf*ck!
244595
%endif # with python2
244595
244595
%if 0%{?with_python3}
244595
%package -n python3-%{srcname}
244595
BuildRequires:  python3-devel, python3-setuptools, python3-nose, python3-sphinx
244595
Summary:        %{sum}
244595
%{?python_provide:%python_provide python3-%{srcname}}
244595
244595
%description -n python3-%{srcname}
244595
Pygments is a generic syntax highlighter for general use in all kinds
244595
of software such as forum systems, wikis or other applications that
244595
need to prettify source code. Highlights are:
244595
244595
  * a wide range of common languages and markup formats is supported
244595
  * special attention is paid to details that increase highlighting
244595
    quality
244595
  * support for new languages and formats are added easily; most
244595
    languages use a simple regex-based lexing mechanism
244595
  * a number of output formats is available, among them HTML, RTF,
244595
    LaTeX and ANSI sequences
244595
  * it is usable as a command-line tool and as a library
244595
  * ... and it highlights even Brainf*ck!
244595
%endif
244595
244595
%prep
244595
%setup -q -n %{upstream_name}-%{version}
244595
%patch0 -p 1
244595
244595
%build
244595
%{__sed} -i 's/\r//' LICENSE
244595
%if %{with python2}
244595
%py2_build
244595
%endif # with python2
244595
244595
%if 0%{?with_python3}
244595
%py3_build
244595
%endif
244595
244595
%install
244595
# Python 2 install
244595
# NOTE: sphinx is built on Python3 and packages with python2 and python3
244595
%if %{with python2}
244595
%py2_install
244595
%endif # with python2
244595
244595
%{__python3} setup.py build_sphinx
244595
pushd doc
244595
install -d %{buildroot}%{_mandir}/man1
244595
mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
244595
popd
244595
cp -r doc/docs doc/reST
244595
244595
%if 0%{?with_python3}
244595
# Python 3 install
244595
%py3_install
244595
%endif
244595
244595
%check
244595
%if %{with python2}
244595
PYTHON=%{__python2} make test
244595
%endif # with python2
244595
PYTHON=%{__python3} make test
244595
244595
%if %{with python2}
244595
%files -n python2-pygments
244595
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
244595
%license LICENSE
244595
# For noarch packages: sitelib
244595
%{python2_sitelib}/*
244595
# Fix build on EL7
244595
%if !0%{?fedora} && 0%{?rhel} <= 7
244595
%{_bindir}/pygmentize
244595
%lang(en) %{_mandir}/man1/pygmentize.1*
244595
%endif
244595
%endif # with python2
244595
244595
%if 0%{?with_python3}
244595
%files -n python3-pygments
244595
%doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
244595
%license LICENSE
244595
%{python3_sitelib}/*
244595
%{_bindir}/pygmentize
244595
%lang(en) %{_mandir}/man1/pygmentize.1*
244595
%endif
244595
244595
%changelog
244595
* Thu Jun 14 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.2.0-12
244595
- Conditionalize the python2 subpackage
244595
244595
* Mon Mar 19 2018 Steve Milner <smilner@redhat.com> - 2.2.0-11
244595
- Added import-directive.patch to work around a change in sphinx.
244595
244595
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-10
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
244595
244595
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.2.0-9
244595
- Cleanup spec file conditionals
244595
244595
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-8
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
244595
244595
* Thu Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-7
244595
- Fixed python2 sitelib in files section.
244595
244595
* Wed Mar 22 2017 Steve Milner <smilner@redhat.com> - 2.2.0-6
244595
- Dropped python26 support.
244595
- Spec clean up
244595
244595
* Mon Mar 20 2017 Steve Milner <smilner@redhat.com> - 2.2.0-5
244595
- Updated for standards per BZ#1433650
244595
244595
* Mon Mar  6 2017 Steve Milner <smilner@redhat.com> - 2.2.0-4
244595
- Added conflict per BZ#1429075
244595
244595
* Mon Mar  6 2017 Steve Milner <smilner@redhat.com> - 2.2.0-3
244595
- Python3 package now houses the pygmentize binary
244595
- Fixed Source0 url to point to pypi.org
244595
- Made python3-nose a hard BuildRequirement for python3
244595
244595
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.2.0-2
244595
- Update bin to come back into line with Fedora standards
244595
244595
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.2.0-1
244595
- Update for upstream release.
244595
244595
* Thu Mar  2 2017 Steve Milner <smilner@redhat.com> - 2.1.3-5
244595
- Split bin between versions.
244595
244595
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-4
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
244595
244595
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.1.3-3
244595
- Rebuild for Python 3.6
244595
- Don't make rpmbuild fail on failed tests for now
244595
244595
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-2
244595
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
244595
244595
* Fri Mar  4 2016 Steve Milner <smilner@redhat.com> - 2.1.3-1
244595
- Update for upstream release.
244595
244595
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-5
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
244595
244595
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-4
244595
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
244595
244595
* Thu Oct 29 2015 Steve Milner <smilner@redhat.com> - 2.0.2-3
244595
- Backport patch to fix font manager shell injection for BZ#1276321
244595
244595
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.0.2-2
244595
- Rebuilt for Python3.5 rebuild
244595
- Also remove python3-sphinx from BR as docs are built only with python2-sphinx
244595
244595
* Mon Aug 24 2015 Steve Milner <smilner@redhat.com> - 2.0.2-1
244595
- update for upstream release.
244595
- Added python-pygments/python3-pygments to BuildRequires.
244595
244595
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
244595
244595
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-3
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
244595
244595
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-2
244595
- Rebuild for Python 3.4
244595
244595
* Tue Nov 26 2013 Steve Milner <smilner@fedoraproject.org> - 1.6-1
244595
- update for upstream release.
244595
244595
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-9
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
244595
244595
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-8
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
244595
244595
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-7
244595
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
244595
244595
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-6
244595
- remove rhel logic from with_python3 conditional
244595
244595
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
244595
244595
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
244595
244595
* Tue Sep 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-3
244595
- Really enable the python3 unittests.
244595
- Fix python26 byte compilation (thanks to Jeffrey Ness)
244595
244595
* Sat Sep 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
244595
- Fix python main package having dependencies for the python2.6 subpackage
244595
- Fix places that used the default python instead of python26
244595
- Attempt to make byte compilation more robust in case we add python3 to EPEL5
244595
- Run unittests on python3 in F15+
244595
244595
* Fri Jun 24 2011 Steve Milner <smilner@fedoraproject.org> - 1.4-1
244595
- update for upstream release
244595
- Add python2.6 support done by Steve Traylen <steve.traylen@cern.ch>. BZ#662755.
244595
244595
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-8
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
244595
244595
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
244595
- update to most recent python guidelines
244595
- rebuild with python3.2
244595
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
244595
244595
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6
244595
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
244595
244595
* Thu May  6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5
244595
- Enforce that Pygments requires Python 2.4 or later via an explicit BR
244595
- Minor tweaks to spec file
244595
- Deliver html and reST doc files to specifically named directories
244595
- Align description with that of http://pygments.org/
244595
- Add %%check section for Python2 and add BR on python-nose
244595
244595
* Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4
244595
- switched with_python3 back to 1
244595
244595
* Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3
244595
- add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now
244595
244595
* Tue Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2
244595
- added python-imaging as a dependency per BZ#581663.
244595
244595
* Sat Mar  6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
244595
- Updated for release.
244595
244595
* Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1
244595
- Updated for release.
244595
244595
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
244595
244595
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
244595
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
244595
244595
* Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3
244595
- Updated for release.
244595
244595
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2
244595
- Rebuild for Python 2.6
244595
244595
* Thu Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1
244595
- Updated for upstream 1.0.
244595
244595
* Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1
244595
- Updated for upstream 0.11.
244595
244595
* Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1
244595
- Updated for upstream 0.10.
244595
244595
* Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2
244595
- Added python-setuptools as a Requires per bz#403601.
244595
244595
* Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1
244595
- Updated for upstream 0.9.
244595
244595
* Fri Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2
244595
- Removed the dos2unix build dependency.
244595
244595
* Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1
244595
- Initial packaging for Fedora.