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

Revision 11941, 7.0 KB checked in by tomop, 5 years ago (diff)

python-jinja2-2.10-2

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
[11941]12Release:        2%{?_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
34# babel isn't py3k ready yet, and is only a weak dependency
35#Requires:       python3-babel >= 0.8
36%endif # with_python3
37
38BuildRequires:  python-setuptools
39
[3794]40Vendor: Project Vine
41Distribution: Vine Linux
[1741]42
43%description
44Jinja2 is a template engine written in pure Python.  It provides a
45Django inspired non-XML syntax but supports inline expressions and an
46optional sandboxed environment.
47
48If you have any exposure to other text-based template languages, such
49as Smarty or Django, you should feel right at home with Jinja2. It's
50both designer and developer friendly by sticking to Python's
51principles and adding functionality useful for templating
52environments.
53
54
55%if 0%{?with_python3}
56%package -n python3-jinja2
57Summary:        General purpose template engine
58Group:          Development/Languages
[11941]59Requires:       python3-markupsafe
[1741]60
61%description -n python3-jinja2
62Jinja2 is a template engine written in pure Python.  It provides a
63Django inspired non-XML syntax but supports inline expressions and an
64optional sandboxed environment.
65
66If you have any exposure to other text-based template languages, such
67as Smarty or Django, you should feel right at home with Jinja2. It's
68both designer and developer friendly by sticking to Python's
69principles and adding functionality useful for templating
70environments.
71%endif # with_python3
72
73
74%prep
[11927]75%setup -qc -n Jinja2-%{version}
[1741]76# cleanup
[11927]77find Jinja2-%{version} -name '*.pyo' -o -name '*.pyc' -delete
[1741]78
79# fix EOL
[11927]80sed -i 's|\r$||g' Jinja2-%{version}/LICENSE
[1741]81
[11927]82mv Jinja2-%{version} python3
83cp -av python3 python2
[1741]84
85%build
[11927]86pushd python2
87%py_build
88%if %{with docs}
89make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-2
90%endif # with docs
91popd
[1741]92
93%if 0%{?with_python3}
[11927]94pushd python3
95%py3_build
96%if %{with docs}
97make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
98%endif # with docs
[1741]99popd
100%endif # with_python3
101
102
103%install
104%__rm -rf %{buildroot}
[11927]105pushd python2
106%py_install
[1741]107
108# remove hidden file
[11927]109rm -rf docs/_build/html/.buildinfo
[1741]110
[11927]111# these files are valid only on Python 3.6+
112rm %{buildroot}%{python_sitelib}/jinja2/asyncsupport.py
113rm %{buildroot}%{python_sitelib}/jinja2/asyncfilters.py
[1741]114popd
115
[11927]116%if %{with python3}
117pushd python3
118%py3_install
[1741]119
[11927]120# remove hidden file
121rm -rf docs/_build/html/.buildinfo
[1741]122
[11927]123%if ! %{with async}
124# these files are valid only on Python 3.6+
125rm %{buildroot}%{python3_sitelib}/jinja2/asyncsupport.py
126rm %{buildroot}%{python3_sitelib}/jinja2/asyncfilters.py
127%endif # ! with async
[1741]128popd
[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
194dependency 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.
Note: See TracBrowser for help on using the repository browser.