python-jinja2-vl.spec 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. %global with_python3 0
  2. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  3. # Enable building without docs to avoid a circular dependency between this
  4. # and python-sphinx:
  5. %global with_docs 0
  6. Name: python-jinja2
  7. Version: 2.5.5
  8. Release: 1%{?_dist_release}
  9. Summary: General purpose template engine
  10. Group: Development/Languages
  11. License: BSD
  12. URL: http://jinja.pocoo.org/
  13. Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  15. BuildArch: noarch
  16. BuildRequires: python-devel
  17. BuildRequires: python-setuptools
  18. BuildRequires: python-markupsafe
  19. %if 0%{?with_docs}
  20. BuildRequires: python-sphinx
  21. %endif # with_docs
  22. Requires: python-babel >= 0.8
  23. Requires: python-markupsafe
  24. %if 0%{?with_python3}
  25. BuildRequires: python3-devel
  26. BuildRequires: python3-setuptools
  27. BuildRequires: python3-markupsafe
  28. Requires: python3-markupsafe
  29. # babel isn't py3k ready yet, and is only a weak dependency
  30. #Requires: python3-babel >= 0.8
  31. %endif # with_python3
  32. BuildRequires: python-setuptools
  33. Vendor: Project Vine
  34. Distribution: Vine Linux
  35. %description
  36. Jinja2 is a template engine written in pure Python. It provides a
  37. Django inspired non-XML syntax but supports inline expressions and an
  38. optional sandboxed environment.
  39. If you have any exposure to other text-based template languages, such
  40. as Smarty or Django, you should feel right at home with Jinja2. It's
  41. both designer and developer friendly by sticking to Python's
  42. principles and adding functionality useful for templating
  43. environments.
  44. %if 0%{?with_python3}
  45. %package -n python3-jinja2
  46. Summary: General purpose template engine
  47. Group: Development/Languages
  48. %description -n python3-jinja2
  49. Jinja2 is a template engine written in pure Python. It provides a
  50. Django inspired non-XML syntax but supports inline expressions and an
  51. optional sandboxed environment.
  52. If you have any exposure to other text-based template languages, such
  53. as Smarty or Django, you should feel right at home with Jinja2. It's
  54. both designer and developer friendly by sticking to Python's
  55. principles and adding functionality useful for templating
  56. environments.
  57. %endif # with_python3
  58. %prep
  59. %setup -q -n Jinja2-%{version}
  60. # cleanup
  61. find . -name '*.pyo' -o -name '*.pyc' -delete
  62. # fix EOL
  63. %__sed -i 's|\r$||g' LICENSE
  64. %if 0%{?with_python3}
  65. %__cp -a . %{py3dir}
  66. %endif # with_python3
  67. %build
  68. %{__python} setup.py build
  69. # for now, we build docs using Python 2.x and use that for both
  70. # packages.
  71. %if 0%{?with_docs}
  72. %__make -C docs html
  73. %endif # with_docs
  74. %if 0%{?with_python3}
  75. pushd %{py3dir}
  76. %{__python3} setup.py build
  77. popd
  78. %endif # with_python3
  79. %install
  80. %__rm -rf %{buildroot}
  81. %{__python} setup.py install -O1 --skip-build \
  82. --root %{buildroot}
  83. # remove hidden file
  84. %__rm -rf docs/_build/html/.buildinfo
  85. %if 0%{?with_python3}
  86. pushd %{py3dir}
  87. %{__python3} setup.py install -O1 --skip-build \
  88. --root %{buildroot}
  89. popd
  90. %endif # with_python3
  91. %clean
  92. %__rm -rf %{buildroot}
  93. %check
  94. %__make test
  95. %if 0%{?with_python3}
  96. pushd %{py3dir}
  97. %__make test
  98. popd
  99. %endif # with_python3
  100. %files
  101. %defattr(-,root,root,-)
  102. %doc AUTHORS CHANGES LICENSE
  103. %if 0%{?with_docs}
  104. %doc docs/_build/html
  105. %endif # with_docs
  106. %doc ext
  107. %doc examples
  108. %{python_sitelib}/*
  109. %exclude %{python_sitelib}/jinja2/_debugsupport.c
  110. %if 0%{?with_python3}
  111. %files -n python3-jinja2
  112. %defattr(-,root,root,-)
  113. %doc AUTHORS CHANGES LICENSE
  114. %if 0%{?with_docs}
  115. %doc docs/_build/html
  116. %endif # with_docs
  117. %doc ext
  118. %doc examples
  119. %{python3_sitelib}/*
  120. %exclude %{python3_sitelib}/jinja2/_debugsupport.c
  121. %endif # with_python3
  122. %changelog
  123. * Thu May 5 2011 IWAI, Masaharu <iwai@alib.jp> 2.5.5-1
  124. - new upstream release
  125. - add Project and Distribution tags
  126. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 2.5.2-1
  127. - initial build based on Fedora development
  128. * Thu Aug 19 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
  129. - Update to upstream version 2.5.2.
  130. - Package depends on python-markupsafe and is noarch now.
  131. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
  132. - add explicit build-requirement on python-setuptools
  133. - fix doc disablement for python3 subpackage
  134. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-3
  135. - support disabling documentation in the build to break a circular build-time
  136. dependency with python-sphinx; disable docs for now
  137. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
  138. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  139. * Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
  140. - Update to upstream version 2.5.
  141. - Create python3 subpackage.
  142. - Minor specfile fixes.
  143. - Add examples directory.
  144. - Thanks to Gareth Armstrong for additional hints.
  145. * Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
  146. - Update to 2.4.1.
  147. * Tue Apr 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4-1
  148. - Update to 2.4.
  149. * Tue Feb 23 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
  150. - Update to 2.3.1.
  151. - Docs are built using Sphinx now.
  152. - Run the testsuite.
  153. * Sat Sep 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
  154. - Update to 2.2.1, mainly a bugfix release.
  155. - Remove patch no longer needed.
  156. - Remove conditional for FC-8.
  157. - Compilation of speedup module has to be explicitly requested now.
  158. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
  159. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  160. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
  161. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  162. * Sat Jan 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
  163. - Update to 2.1.1 (bugfix release).
  164. * Thu Dec 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.1-1
  165. - Update to 2.1, which fixes a number of bugs.
  166. See http://jinja.pocoo.org/2/documentation/changelog#version-2-1.
  167. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0-3
  168. - Rebuild for Python 2.6
  169. * Tue Jul 22 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-2
  170. - Use rpm buildroot macro instead of RPM_BUILD_ROOT.
  171. * Sun Jul 20 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
  172. - Upstream released 2.0.
  173. * Sun Jun 29 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-0.1.rc1
  174. - Modified specfile from the existing python-jinja package.