- Update to upstream version 2.5.
- Create python3 subpackage.
This commit is contained in:
parent
d3e47dbe1e
commit
bb45b9d930
@ -1 +1 @@
|
|||||||
Jinja2-2.4.1.tar.gz
|
Jinja2-2.5.tar.gz
|
||||||
|
@ -5,3 +5,4 @@ python-jinja2-2_2_1-1_fc11:HEAD:python-jinja2-2.2.1-1.fc11.src.rpm:1253462191
|
|||||||
python-jinja2-2_3_1-1_fc12:HEAD:python-jinja2-2.3.1-1.fc12.src.rpm:1266965250
|
python-jinja2-2_3_1-1_fc12:HEAD:python-jinja2-2.3.1-1.fc12.src.rpm:1266965250
|
||||||
python-jinja2-2_4-1_fc12:HEAD:python-jinja2-2.4-1.fc12.src.rpm:1271178578
|
python-jinja2-2_4-1_fc12:HEAD:python-jinja2-2.4-1.fc12.src.rpm:1271178578
|
||||||
python-jinja2-2_4_1-1_fc12:HEAD:python-jinja2-2.4.1-1.fc12.src.rpm:1271848385
|
python-jinja2-2_4_1-1_fc12:HEAD:python-jinja2-2.4.1-1.fc12.src.rpm:1271848385
|
||||||
|
python-jinja2-2_5-1_fc13:HEAD:python-jinja2-2.5-1.fc13.src.rpm:1279059589
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
|
||||||
|
%global with_python3 1
|
||||||
|
%else
|
||||||
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-jinja2
|
Name: python-jinja2
|
||||||
Version: 2.4.1
|
Version: 2.5
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: General purpose template engine
|
Summary: General purpose template engine
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -10,9 +14,18 @@ URL: http://jinja.pocoo.org/
|
|||||||
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
|
Source0: http://pypi.python.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools-devel
|
|
||||||
BuildRequires: python-sphinx
|
BuildRequires: python-sphinx
|
||||||
Requires: python-babel >= 0.8
|
Requires: python-babel >= 0.8
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
# babel isn't py3k ready yet, and is only a weak dependency
|
||||||
|
#Requires: python3-babel >= 0.8
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
%if 0%{?fedora} < 13
|
||||||
|
BuildRequires: python-setuptools-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -27,17 +40,49 @@ principles and adding functionality useful for templating
|
|||||||
environments.
|
environments.
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%package -n python3-jinja2
|
||||||
|
Summary: General purpose template engine
|
||||||
|
Group: Development/Languages
|
||||||
|
|
||||||
|
|
||||||
|
%description -n python3-jinja2
|
||||||
|
Jinja2 is a template engine written in pure Python. It provides a
|
||||||
|
Django inspired non-XML syntax but supports inline expressions and an
|
||||||
|
optional sandboxed environment.
|
||||||
|
|
||||||
|
If you have any exposure to other text-based template languages, such
|
||||||
|
as Smarty or Django, you should feel right at home with Jinja2. It's
|
||||||
|
both designer and developer friendly by sticking to Python's
|
||||||
|
principles and adding functionality useful for templating
|
||||||
|
environments.
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Jinja2-%{version}
|
%setup -q -n Jinja2-%{version}
|
||||||
|
|
||||||
# fix EOL
|
# fix EOL
|
||||||
sed -i 's|\r$||g' LICENSE
|
sed -i 's|\r$||g' LICENSE
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py --with-speedups build
|
CFLAGS="%{optflags}" %{__python} setup.py --with-speedups build
|
||||||
|
|
||||||
|
# for now, we build docs using Python 2.x and use that for both
|
||||||
|
# packages.
|
||||||
make -C docs html
|
make -C docs html
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
CFLAGS="%{optflags}" %{__python3} setup.py --with-speedups build
|
||||||
|
popd
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -50,6 +95,15 @@ chmod 0755 %{buildroot}%{python_sitearch}/jinja2/_speedups.so
|
|||||||
# remove hidden file
|
# remove hidden file
|
||||||
rm -rf docs/_build/html/.buildinfo
|
rm -rf docs/_build/html/.buildinfo
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py --with-speedups install -O1 --skip-build \
|
||||||
|
--root %{buildroot}
|
||||||
|
|
||||||
|
# ensure correct permission
|
||||||
|
chmod 0755 %{buildroot}%{python3_sitearch}/jinja2/_speedups.so
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -59,16 +113,43 @@ rm -rf %{buildroot}
|
|||||||
make test
|
make test
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
make test
|
||||||
|
popd
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc AUTHORS CHANGES LICENSE
|
%doc AUTHORS CHANGES LICENSE
|
||||||
%doc docs/_build/html
|
%doc docs/_build/html
|
||||||
%doc ext
|
%doc ext
|
||||||
|
%doc examples
|
||||||
%{python_sitearch}/*
|
%{python_sitearch}/*
|
||||||
%exclude %{python_sitearch}/jinja2/_speedups.c
|
%exclude %{python_sitearch}/jinja2/_speedups.c
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-jinja2
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc AUTHORS CHANGES LICENSE
|
||||||
|
%doc docs/_build/html
|
||||||
|
%doc ext
|
||||||
|
%doc examples
|
||||||
|
%{python3_sitearch}/*
|
||||||
|
%exclude %{python3_sitearch}/jinja2/_speedups.c
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
|
||||||
|
- Update to upstream version 2.5.
|
||||||
|
- Create python3 subpackage.
|
||||||
|
- Minor specfile fixes.
|
||||||
|
- Add examples directory.
|
||||||
|
- Thanks to Gareth Armstrong for additional hints.
|
||||||
|
|
||||||
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
|
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
|
||||||
- Update to 2.4.1.
|
- Update to 2.4.1.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user