python-pygments-vl.spec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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: 1%{?_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. %py_build
  61. %if 0%{?with_python3}
  62. %py3_build
  63. %endif
  64. %install
  65. %__rm -rf $RPM_BUILD_ROOT
  66. # Python 2 install
  67. # NOTE: sphinx is built on Python2 and packages with python2 and python3
  68. %py_install
  69. %{__python} 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. %if 0%{?with_python3}
  76. # Python 3 install
  77. %py3_install
  78. %endif
  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. * 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.