From 3eafc2522987329dc09d45c2ce77b4b445279b14 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Aug 12 2010 02:14:47 +0000 Subject: Merge branch 'master' into f12 --- diff --git a/python-tempita.spec b/python-tempita.spec index e572bc1..ea38d9c 100644 --- a/python-tempita.spec +++ b/python-tempita.spec @@ -1,36 +1,86 @@ +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%else %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%endif Name: python-tempita Version: 0.4 -Release: 2%{?dist} +Release: 5%{?dist} Summary: A very small text templating language Group: Development/Languages License: MIT URL: http://pythonpaste.org/tempita/ Source0: http://pypi.python.org/packages/source/T/Tempita/Tempita-%{version}.tar.gz +Patch0: tempita-py3-compat.diff BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch +%if 0%{?fedora} < 13 BuildRequires: python-setuptools-devel +%else +BuildRequires: python-setuptools +%endif BuildRequires: python-nose +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif # if with_python3 + %description Tempita is a small templating language for text substitution. +%if 0%{?with_python3} +%package -n python3-tempita +Summary: A very small text templating language +Group: Development/Languages +# Without one of these there's no aes implementation which means there's no way to +# have encrypted cookies. This is a reduction in features over the python2 version. +# Currently there's no working python3 port for either: +# http://allmydata.org/trac/pycryptopp/ticket/35 +# http://lists.dlitz.net/pipermail/pycrypto/2010q2/000253.html +#%if 0%{?fedora} +#Requires: python3-pycryptopp +#%else +#Requires: python3-crypto +#%endif + +%description -n python3-tempita +Tempita is a small templating language for text substitution. +%endif # with_python3 + + %prep %setup -q -n Tempita-%{version} +%patch0 -p1 -b .py3compat + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # with_python3 %build %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 %install %{__rm} -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} - +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT +popd +%endif # with_python3 + %clean %{__rm} -rf %{buildroot} @@ -42,11 +92,28 @@ nosetests %files %defattr(-,root,root,-) %doc docs/* -%{python_sitelib}/tempita +%{python_sitelib}/tempita/ %{python_sitelib}/*.egg-info +%if 0%{?with_python3} +%files -n python3-tempita +%defattr(-,root,root,-) +%{python3_sitelib}/tempita/ +%{python3_sitelib}/*.egg-info +%endif %changelog +* Tue Aug 3 2010 Kyle VanderBeek - 0.4-5 +- Add python3-tempita subpackage. + +* Thu Jul 22 2010 David Malcolm - 0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Sat Jun 26 2010 Toshio Kuratomi - 0.4-3 +- Cosmetic fixes -- BR python-setuptools instead of python-setuptools-devel +- Conditionalize python_sitelib definition +- trailing slash for directory in %%files + * Sun Jul 26 2009 Fedora Release Engineering - 0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/tempita-py3-compat.diff b/tempita-py3-compat.diff new file mode 100644 index 0000000..806300b --- /dev/null +++ b/tempita-py3-compat.diff @@ -0,0 +1,24 @@ +diff -r 21248eaca98c -r cfd954445f47 setup.py +--- a/setup.py Tue Oct 27 23:52:47 2009 +0000 ++++ b/setup.py Tue Aug 03 12:44:18 2010 -0700 +@@ -1,8 +1,12 @@ +-from setuptools import setup, find_packages +-import sys, os ++from setuptools import setup ++import sys + + version = '0.4' + ++extra = {} ++if sys.version_info >= (3,): ++ extra['use_2to3'] = True ++ + setup(name='Tempita', + version=version, + description="A very small text templating language", +@@ -39,4 +43,5 @@ + test_suite='nose.collector', + include_package_data=True, + zip_safe=True, ++ **extra + )