python-jinja2-vl.spec 6.1 KB

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