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