source: projects/specs/trunk/p/python-jinja2/python-jinja2-vl.spec @ 11927

Revision 11927, 6.9 KB checked in by tomop, 5 years ago (diff)

python-jinja2-2.10-1

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