From c0811311836f181fe2aff5ba8b68d47c47d2ec5f Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Sep 08 2011 08:19:22 +0000 Subject: Require beaker to run unittests since its required at runtime Fix license tag --- diff --git a/python-mako.spec b/python-mako.spec index 105b912..84508b2 100644 --- a/python-mako.spec +++ b/python-mako.spec @@ -1,23 +1,35 @@ %if 0%{?fedora} || 0%{?rhel} > 6 %global with_python3 1 -%else +%endif + +%if 0%{?rhel} && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif +%if 0%{?fedora} <= 16 +%{!?python3_version: %global python3_version %(%{__python3} -c 'import sys ; sys.stdout.write("%s.%s" % sys.version_info[:2])')} +%endif + Name: python-mako Version: 0.4.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mako template library for Python Group: Development/Languages # Mostly MIT, but _ast_util.py is Python licensed. -License: MIT and Python +# The documentation contains javascript for search licensed BSD or GPLv2 +License: (MIT and Python) and (BSD or GPLv2) URL: http://www.makotemplates.org/ Source0: http://www.makotemplates.org/downloads/Mako-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: python-setuptools python-nose python-markupsafe -Requires: python-beaker python-markupsafe +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-markupsafe +BuildRequires: python-beaker +BuildRequires: python-nose +Requires: python-markupsafe +Requires: python-beaker %if 0%{?with_python3} BuildRequires: python3-devel @@ -44,7 +56,8 @@ calling and scoping semantics. %package -n python3-mako Summary: Mako template library for Python 3 Group: Development/Languages -Requires: python3-beaker python3-markupsafe +Requires: python3-beaker +Requires: python3-markupsafe %description -n python3-mako Mako is a template library written in Python. It provides a familiar, non-XML @@ -55,6 +68,8 @@ Python (i.e. Python Server Page) language, which refines the familiar ideas of componentized layout and inheritance to produce one of the most straightforward and flexible models available, while also maintaining close ties to Python calling and scoping semantics. + +This package contains the mako module built for use with python3. %endif # with_python3 %prep @@ -77,20 +92,18 @@ popd %install -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %if 0%{?with_python3} pushd %{py3dir} -%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT -mv $RPM_BUILD_ROOT/%{_bindir}/mako-render $RPM_BUILD_ROOT/%{_bindir}/python3-mako-render +%{__python3} setup.py install --skip-build --root %{buildroot} +mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render popd %endif # with_python3 -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +%{__python} setup.py install --skip-build --root %{buildroot} -# These are supporting files for building the docs. Also, they -# contain files licensed GPLv2 or BSD which confuses the licensing -# situation. Just don't ship them. +# These are supporting files for building the docs. No need to ship rm -rf doc/build %check @@ -98,12 +111,12 @@ PYTHONPATH=$(pwd) nosetests %if 0%{?with_python3} && 0%{?fedora} > 14 pushd %{py3dir} -PYTHONPATH=$(pwd) nosetests-3.2 +PYTHONPATH=$(pwd) nosetests-%{python3_version} popd %endif %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files @@ -115,12 +128,17 @@ rm -rf $RPM_BUILD_ROOT %if 0%{?with_python3} %files -n python3-mako %defattr(-,root,root,-) +%doc CHANGES LICENSE README doc examples %{_bindir}/python3-mako-render %{python3_sitelib}/* %endif %changelog -* Mon Sep 5 2011 Toshio Kuratomi - 0.4.1-1 +* Mon Sep 5 2011 Toshio Kuratomi - 0.4.2-2 +- Require beaker to run unittests since its required at runtime +- Fix license tag + +* Mon Sep 5 2011 Toshio Kuratomi - 0.4.2-1 - Update to 0.4.2 - Run unit tests on python3