python-pygments-vl.spec 6.4 KB

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