python-jinja2-vl.spec 6.8 KB

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