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