python-pygments-vl.spec 6.5 KB

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