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

Line 
1# async support is valid only on Python >= 3.6
2%bcond_with async
3# Enable building without docs to avoid a circular dependency between this
4# and python-sphinx:
5%bcond_with docs
6
7%global with_python3 1
8
9
10Name:           python-jinja2
11Version:        2.10
12Release:        1%{?_dist_release}
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
21BuildRequires:  python-rpm-macros
22BuildRequires:  python-setuptools
23BuildRequires:  python-markupsafe
24%if %{with docs}
25BuildRequires:  python-sphinx
26%endif # with docs
27Requires:       python-babel >= 0.8
28Requires:       python-markupsafe
29%if 0%{?with_python3}
30BuildRequires:  python3-devel
31BuildRequires:  python3-rpm-macros
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
41Vendor: Project Vine
42Distribution: Vine Linux
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
76%setup -qc -n Jinja2-%{version}
77# cleanup
78find Jinja2-%{version} -name '*.pyo' -o -name '*.pyc' -delete
79
80# fix EOL
81sed -i 's|\r$||g' Jinja2-%{version}/LICENSE
82
83mv Jinja2-%{version} python3
84cp -av python3 python2
85
86%build
87pushd python2
88%py_build
89%if %{with docs}
90make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-2
91%endif # with docs
92popd
93
94%if 0%{?with_python3}
95pushd python3
96%py3_build
97%if %{with docs}
98make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
99%endif # with docs
100popd
101%endif # with_python3
102
103
104%install
105%__rm -rf %{buildroot}
106pushd python2
107%py_install
108
109# remove hidden file
110rm -rf docs/_build/html/.buildinfo
111
112# these files are valid only on Python 3.6+
113rm %{buildroot}%{python_sitelib}/jinja2/asyncsupport.py
114rm %{buildroot}%{python_sitelib}/jinja2/asyncfilters.py
115popd
116
117%if %{with python3}
118pushd python3
119%py3_install
120
121# remove hidden file
122rm -rf docs/_build/html/.buildinfo
123
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
129popd
130%endif # with python3
131
132%clean
133%__rm -rf %{buildroot}
134
135%files
136%defattr(-,root,root,-)
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
147
148%if 0%{?with_python3}
149%files -n python3-jinja2
150%defattr(-,root,root,-)
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
161%endif # with_python3
162
163
164%changelog
165* Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.10-1
166- new upstream release.
167- added python3 support.
168
169* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.5.5-3
170- rebuild with VineSeed environment
171
172* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.5.5-2
173- rebuild with python-2.7.2
174
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
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.