%define tarname Pygments %define subrel 1 Name: python-pygments Version: 1.6 Release: %mkrel 9 Summary: Syntax highlighting package written in Python Group: Development/Python License: BSD URL: http://pygments.org/ Source0: http://pypi.python.org/packages/source/P/%{tarname}/%{tarname}-%{version}.tar.gz BuildRequires: pkgconfig(python) BuildRequires: python-setuptools Requires: python-pkg-resources BuildArch: noarch BuildRequires: pkgconfig(python3) BuildRequires: python3-setuptools # Add missing highlight for Suggests: Patch0: python-pygments-1.6rc1-mga-add_Suggests-other.py.patch Patch1: fix-shell-injection-in-font-manager.patch %description Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a wide range of common languages and markup formats is supported * special attention is paid to details, increasing quality by a fair amount * support for new languages and formats are added easily * a number of output formats, presently HTML, LaTeX, RTF, SVG and ANSI sequences * it is usable as a command-line tool and as a library * ... and it highlights even Brainf*ck! %package -n python3-pygments Summary: Syntax highlighting package written in Python3 Group: Development/Python %description -n python3-pygments Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. %prep %setup -q -n %{tarname}-%{version} %patch0 -p0 -b .python-pygments-1.6rc1-mga-add_Suggests-other.py.patch %patch1 -p1 rm -rf %{py3dir} cp -a . %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %build pushd %{py3dir} %{__python3} setup.py build popd %{__python} setup.py build %install pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/python3-pygmentize popd %{__python} setup.py install -O1 --skip-build --root=%{buildroot} mv docs/build html %__mkdir -p %{buildroot}%{_mandir}/man1 %__sed -i 's/\/usr\/share\/doc\/python-pygments\//\/usr\/share\/doc\/python-pygments\/html\//' docs/pygmentize.1 %__install -m 644 docs/pygmentize.1 %{buildroot}%{_mandir}/man1 %files %doc AUTHORS CHANGES LICENSE TODO html/ %{python_sitelib}/* %{_bindir}/pygmentize %_mandir/man1/pygmentize.* %files -n python3-pygments %doc AUTHORS CHANGES html/ LICENSE TODO %{python3_sitelib}/* %{_bindir}/python3-pygmentize %changelog * Mon Dec 14 2015 philippem <philippem> 1.6-9.1.mga5 + Revision: 910474 - better fix for shell injection security issue mga#17331 - Backport patch to fix font manager shell injection for mga#17165 * Wed Oct 15 2014 umeabot <umeabot> 1.6-8.mga5 + Revision: 745456 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 1.6-7.mga5 + Revision: 726917 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 1.6-6.mga5 + Revision: 688257 - Mageia 5 Mass Rebuild * Sat May 31 2014 pterjan <pterjan> 1.6-5.mga5 + Revision: 628947 - Rebuild for new Python * Tue Oct 22 2013 philippem <philippem> 1.6-4.mga4 + Revision: 546306 - fix rel, Rebuild to add different pythonegg provides for python 2 and 3 - cleaning spec + umeabot <umeabot> - Mageia 4 Mass Rebuild + pterjan <pterjan> - Rebuild to add different pythonegg provides for python 2 and 3 * Tue Jul 02 2013 philippem <philippem> 1.6-2.mga4 + Revision: 449652 - add Python3 * Mon Feb 11 2013 fwang <fwang> 1.6-1.mga3 + Revision: 397845 - new version 1.6 final * Sun Jan 20 2013 barjac <barjac> 1.6-0.rc1.1.mga3 + Revision: 390024 - new version with RPMSpec lexer - patched to highlight Suggests - should fix Mga #7906 * Sun Jan 13 2013 umeabot <umeabot> 1.5-2.mga3 + Revision: 379348 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Sep 08 2012 philippem <philippem> 1.5-1.mga3 + Revision: 290083 - New upstream release 1.5 * Mon Feb 21 2011 ahmad <ahmad> 1.4-2.mga1 + Revision: 55580 - rebuild to make all pythonegg requires/provides lowercase * Thu Feb 03 2011 ahmad <ahmad> 1.4-1.mga1 + Revision: 46751 - update to 1.4 * Mon Jan 17 2011 pterjan <pterjan> 1.3.1-6.mga1 + Revision: 21281 - Rebuild for python 2.7 * Thu Jan 13 2011 ahmad <ahmad> 1.3.1-5.mga1 + Revision: 8347 - drop the old %%py_requires macro and add BR python-devel - imported package python-pygments * Fri Oct 29 2010 Michael Scherer <misc@mandriva.org> 1.3.1-4mdv2011.0 + Revision: 589997 - rebuild for python 2.7 * Mon May 03 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1.3.1-3mdv2010.1 + Revision: 541787 - add python-pkg-resources dependency * Thu Apr 01 2010 Lev Givon <lev@mandriva.org> 1.3.1-2mdv2010.1 + Revision: 530751 - Fix file inclusion. - Update to 1.3.1. * Sun Jan 10 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1.2.2-1mdv2010.1 + Revision: 488810 - update to new version 1.2.2 * Sun Jan 03 2010 Frederik Himpe <fhimpe@mandriva.org> 1.2.1-1mdv2010.1 + Revision: 485874 - update to new version 1.2.1 * Mon Sep 14 2009 Lev Givon <lev@mandriva.org> 1.1-1mdv2010.0 + Revision: 441076 - Update to 1.1. * Thu May 07 2009 Michael Scherer <misc@mandriva.org> 1.0-2mdv2010.0 + Revision: 372783 - fix missing directory, close bug #50659 - remove generation of .pyo * Sun Jan 04 2009 Jérôme Soyer <saispo@mandriva.org> 1.0-1mdv2009.1 + Revision: 324274 - New upstream release * Mon Dec 29 2008 Funda Wang <fwang@mandriva.org> 0.11.1-2mdv2009.1 + Revision: 320911 - add BR - rebuild for new python * Sat Nov 22 2008 Guillaume Rousse <guillomovitch@mandriva.org> 0.11.1-1mdv2009.1 + Revision: 305851 - update to new version 0.11.1 * Tue Aug 19 2008 Lev Givon <lev@mandriva.org> 0.10-1mdv2009.0 + Revision: 274019 - Update to 0.10. * Fri Aug 01 2008 Thierry Vignaud <tv@mandriva.org> 0.9-5mdv2009.0 + Revision: 259771 - rebuild * Fri Jul 25 2008 Thierry Vignaud <tv@mandriva.org> 0.9-4mdv2009.0 + Revision: 247598 - rebuild * Mon Feb 18 2008 Thierry Vignaud <tv@mandriva.org> 0.9-2mdv2008.1 + Revision: 171064 - rebuild - fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake - fix description-line-too-long - kill re-definition of %%buildroot on Pixel's request - fix summary-ended-with-dot + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Sun Oct 21 2007 Colin Guthrie <cguthrie@mandriva.org> 0.9-1mdv2008.1 + Revision: 100733 - import python-pygments