[pystache] Update to 0.5.3

Ankur Sinha ankursinha at fedoraproject.org
Sun May 19 11:34:26 UTC 2013


commit f1be2b313591eb8a884f4a9dee35fb7c7278b151
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur at gmail.com>
Date:   Sun May 19 21:31:43 2013 +1000

    Update to 0.5.3
    
    Add py3 support. Upstream says py3 is supported but the tests fail.
    Maybe they need to be run in a different way. Will get in touch with
    upstream.

 .gitignore    |    1 +
 pystache.spec |   75 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 sources       |    2 +-
 3 files changed, 70 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 499eebe..65b70f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /pystache-0.3.1.tar.gz
 /pystache-0.5.2.tar.gz
+/pystache-0.5.3.tar.gz
diff --git a/pystache.spec b/pystache.spec
index 7b5a751..293fecd 100644
--- a/pystache.spec
+++ b/pystache.spec
@@ -1,6 +1,7 @@
+%global with_python3 1
 Name:           pystache
-Version:        0.5.2
-Release:        2%{?dist}
+Version:        0.5.3
+Release:        1%{?dist}
 Summary:        Mustache for Python
 
 License:        MIT
@@ -8,8 +9,20 @@ URL:            http://pypi.python.org/pypi/%{name}/
 Source0:        http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
 
 BuildArch:      noarch
+
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
+# For the test
+BuildRequires:  python-simplejson
+Requires:       python-simplejson
+
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+# For the test
+BuildRequires:  python3-simplejson
+Requires:       python3-simplejson
+%endif # if with_python3
 
 %description
 Inspired by ctemplate and et, Mustache is a framework-agnostic way to render
@@ -18,29 +31,77 @@ logic-free views.
 As ctemplates says, "It emphasizes separating logic from presentation: it is
 impossible to embed application logic in this template language."
 
-Pystache is a Python implementation of Mustache. It has been tested with Python
-2.6.1.
 
+%if 0%{?with_python3}
+%package -n python3-pystache
+Group:          Applications/System
+Summary:        Mustache for Python
+
+%description -n python3-pystache
+Inspired by ctemplate and et, Mustache is a framework-agnostic way to render
+logic-free views.
+
+As ctemplates says, "It emphasizes separating logic from presentation: it is
+impossible to embed application logic in this template language."
+
+%endif # with_python3
 %prep
 %setup -q
+rm -fvr pystache.egg-info
 
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+%{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
 
 %install
 rm -rf $RPM_BUILD_ROOT
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif # with_python3
+
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
- 
+%check
+%{__python} -m pystache.commands.test
+
+# tests fail for py3 for some reason
+#%if 0%{?with_python3}
+#pushd %{py3dir}
+#%{__python3} -m pystache.commands.test
+#popd
+#%endif # with_python3 
+
 %files
-%doc PKG-INFO HISTORY.rst README.rst
+%doc PKG-INFO HISTORY.md README.md LICENSE
 %{python_sitelib}/%{name}/
 %{python_sitelib}/%{name}-%{version}-py?.?.egg-info
 %{_bindir}/%{name}*
 
+%if 0%{?with_python3}
+%files -n python3-pystache
+%doc PKG-INFO HISTORY.md README.md LICENSE
+%{python3_sitelib}/%{name}/
+%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
+%endif # with_python3
+
 %changelog
+* Sun May 19 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.5.3-1
+- Update to 0.5.3
+- Add py3 support
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index bd2d9da..7c88c06 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-315badf564ab4d17d79ceec38b4964b9  pystache-0.5.2.tar.gz
+32beedc4ee01cca737ae8f05e65fb53f  pystache-0.5.3.tar.gz


More information about the scm-commits mailing list