python-pygments-vl.spec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. %bcond_with test
  2. %global with_python3 1
  3. %global upstream_name Pygments
  4. %global srcname pygments
  5. Name: python-pygments
  6. Version: 2.6.1
  7. Release: 1%{?_dist_release}
  8. Summary: A syntax highlighting engine written in Python
  9. Group: programming
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: BSD
  13. URL: http://pygments.org/
  14. Source0: https://pypi.python.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  16. BuildArch: noarch
  17. BuildRequires: python-rpm-macros
  18. %if 0%{?with_python3}
  19. BuildRequires: python3-devel, python3-setuptools, python3-nose
  20. BuildRequires: python3-rpm-macros
  21. BuildRequires: python3-sphinx
  22. %endif # if with_python3
  23. %description
  24. Pygments is a generic syntax highlighter for general use in all kinds
  25. of software such as forum systems, wikis or other applications that
  26. need to prettify source code. Highlights are:
  27. * a wide range of common languages and markup formats is supported
  28. * special attention is paid to details that increase highlighting
  29. quality
  30. * support for new languages and formats are added easily; most
  31. languages use a simple regex-based lexing mechanism
  32. * a number of output formats is available, among them HTML, RTF,
  33. LaTeX and ANSI sequences
  34. * it is usable as a command-line tool and as a library
  35. * ... and it highlights even Brainf*ck!
  36. %if 0%{?with_python3}
  37. %package -n python3-pygments
  38. Summary: A syntax highlighting engine written in Python 3
  39. Group: programming
  40. Requires: python3-setuptools
  41. Obsoletes: python-pygments < 2.6.0
  42. %description -n python3-pygments
  43. Pygments is a generic syntax highlighter for general use in all kinds
  44. of software such as forum systems, wikis or other applications that
  45. need to prettify source code. Highlights are:
  46. * a wide range of common languages and markup formats is supported
  47. * special attention is paid to details that increase highlighting
  48. quality
  49. * support for new languages and formats are added easily; most
  50. languages use a simple regex-based lexing mechanism
  51. * a number of output formats is available, among them HTML, RTF,
  52. LaTeX and ANSI sequences
  53. * it is usable as a command-line tool and as a library
  54. * ... and it highlights even Brainf*ck!
  55. %endif # if with_python3
  56. %prep
  57. %setup -q -n %{upstream_name}-%{version}
  58. %build
  59. %{__sed} -i 's/\r//' LICENSE
  60. %if 0%{?with_python3}
  61. %py3_build
  62. %endif
  63. %install
  64. %__rm -rf $RPM_BUILD_ROOT
  65. %if 0%{?with_python3}
  66. # Python 3 install
  67. %py3_install
  68. %endif
  69. %{__python3} setup.py build_sphinx
  70. pushd doc
  71. install -d %{buildroot}%{_mandir}/man1
  72. mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
  73. popd
  74. cp -r doc/docs doc/reST
  75. %clean
  76. %__rm -rf $RPM_BUILD_ROOT
  77. %if %{with test}
  78. %check
  79. make test PYTHON=%{__python}
  80. %if 0%{?with_python3}
  81. make test PYTHON=%{__python3}
  82. %endif
  83. %endif
  84. %if 0%{?with_python3}
  85. %files -n python3-pygments
  86. %defattr(-,root,root,-)
  87. %doc AUTHORS CHANGES build/sphinx/html doc/reST TODO
  88. %license LICENSE
  89. %{python3_sitelib}/*
  90. %{_bindir}/pygmentize
  91. %lang(en) %{_mandir}/man1/pygmentize.1*
  92. %endif # with_python3
  93. %changelog
  94. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.6.1-1
  95. - new upstream release.
  96. - built with python3 only.
  97. * Sat Feb 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.5.2-1
  98. - new upstream release.
  99. * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.3.0-2
  100. - packed pygmentize for python2.
  101. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.3.0-1
  102. - new upstream release.
  103. - added python3 support.
  104. * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1.3-1
  105. - new upstream release.
  106. * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-3
  107. - rebuild with VineSeed environment
  108. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-2
  109. - rebuild with python-2.7.2
  110. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 1.3.1-1
  111. - initial build based on Fedora development
  112. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6
  113. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  114. * Thu May 6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5
  115. - Enforce that Pygments requires Python 2.4 or later via an explicit BR
  116. - Minor tweaks to spec file
  117. - Deliver html and reST doc files to specifically named directories
  118. - Align description with that of http://pygments.org/
  119. - Add %%check section for Python2 and add BR on python-nose
  120. * Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4
  121. - switched with_python3 back to 1
  122. * Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3
  123. - add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now
  124. * Tue Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2
  125. - added python-imaging as a dependency per BZ#581663.
  126. * Sat Mar 6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
  127. - Updated for release.
  128. * Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1
  129. - Updated for release.
  130. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
  131. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  132. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
  133. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  134. * Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3
  135. - Updated for release.
  136. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2
  137. - Rebuild for Python 2.6
  138. * Thu Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1
  139. - Updated for upstream 1.0.
  140. * Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1
  141. - Updated for upstream 0.11.
  142. * Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1
  143. - Updated for upstream 0.10.
  144. * Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2
  145. - Added python-setuptools as a Requires per bz#403601.
  146. * Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1
  147. - Updated for upstream 0.9.
  148. * Fri Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2
  149. - Removed the dos2unix build dependency.
  150. * Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1
  151. - Initial packaging for Fedora.