python-jinja2-vl.spec 7.0 KB

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