python-pygments-vl.spec 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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.13.0
  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. %pip3_build_wheel
  62. %endif
  63. %install
  64. %if 0%{?with_python3}
  65. # Python 3 install
  66. %pip3_install_wheel
  67. %endif
  68. %make_build -C doc html
  69. rm doc/_build/html/.buildinfo
  70. rm -rf doc/_build/html/_sources
  71. install doc/pygmentize.1 -Dt %{buildroot}%{_mandir}/man1/
  72. chmod 644 %{buildroot}%{_mandir}/man1/*.1
  73. %clean
  74. %__rm -rf $RPM_BUILD_ROOT
  75. %if %{with test}
  76. %check
  77. make test PYTHON=%{__python}
  78. %if 0%{?with_python3}
  79. make test PYTHON=%{__python3}
  80. %endif
  81. %endif
  82. %if 0%{?with_python3}
  83. %files -n python3-pygments
  84. %defattr(-,root,root,-)
  85. %license LICENSE
  86. %doc AUTHORS CHANGES TODO
  87. %doc doc/_build/html
  88. %{python3_sitelib}/*
  89. %{_bindir}/pygmentize
  90. %lang(en) %{_mandir}/man1/pygmentize.1*
  91. %endif # with_python3
  92. %changelog
  93. * Tue Nov 01 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.13.0-1
  94. - new upstream release.
  95. * Fri Mar 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.8.1-1
  96. - new upstream release.
  97. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.6.1-1
  98. - new upstream release.
  99. - built with python3 only.
  100. * Sat Feb 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.5.2-1
  101. - new upstream release.
  102. * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.3.0-2
  103. - packed pygmentize for python2.
  104. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.3.0-1
  105. - new upstream release.
  106. - added python3 support.
  107. * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.1.3-1
  108. - new upstream release.
  109. * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-3
  110. - rebuild with VineSeed environment
  111. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-2
  112. - rebuild with python-2.7.2
  113. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 1.3.1-1
  114. - initial build based on Fedora development
  115. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6
  116. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  117. * Thu May 6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5
  118. - Enforce that Pygments requires Python 2.4 or later via an explicit BR
  119. - Minor tweaks to spec file
  120. - Deliver html and reST doc files to specifically named directories
  121. - Align description with that of http://pygments.org/
  122. - Add %%check section for Python2 and add BR on python-nose
  123. * Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4
  124. - switched with_python3 back to 1
  125. * Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3
  126. - add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now
  127. * Tue Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2
  128. - added python-imaging as a dependency per BZ#581663.
  129. * Sat Mar 6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
  130. - Updated for release.
  131. * Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1
  132. - Updated for release.
  133. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
  134. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  135. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
  136. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  137. * Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3
  138. - Updated for release.
  139. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2
  140. - Rebuild for Python 2.6
  141. * Thu Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1
  142. - Updated for upstream 1.0.
  143. * Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1
  144. - Updated for upstream 0.11.
  145. * Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1
  146. - Updated for upstream 0.10.
  147. * Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2
  148. - Added python-setuptools as a Requires per bz#403601.
  149. * Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1
  150. - Updated for upstream 0.9.
  151. * Fri Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2
  152. - Removed the dos2unix build dependency.
  153. * Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1
  154. - Initial packaging for Fedora.