[python-mako0.4] Initial import

Toshio くらとみ toshio at fedoraproject.org
Mon Oct 3 19:21:19 UTC 2011


commit 7fbd91a345cfb18604b4b4ecba6d1303a8f6c5b6
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Mon Oct 3 12:20:38 2011 -0700

    Initial import

 .gitignore          |    1 +
 python-mako0.4.spec |  173 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sources             |    1 +
 3 files changed, 175 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e061137 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Mako-0.4.2.tar.gz
diff --git a/python-mako0.4.spec b/python-mako0.4.spec
new file mode 100644
index 0000000..5aaf583
--- /dev/null
+++ b/python-mako0.4.spec
@@ -0,0 +1,173 @@
+%if 0%{?fedora} || 0%{?rhel} > 6
+%global with_python3 1
+%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-mako0.4
+Version: 0.4.2
+Release: 7%{?dist}
+Summary: Mako template library for Python
+
+Group: Development/Languages
+# Mostly MIT, but _ast_util.py is Python licensed.
+# 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: python2-devel
+BuildRequires: python-setuptools
+BuildRequires: python-markupsafe
+BuildRequires: python-beaker
+BuildRequires: python-nose
+Requires: python-markupsafe
+Requires: python-setuptools
+Requires: python-beaker
+
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-markupsafe
+BuildRequires: python3-beaker
+%if 0%{?fedora} > 14
+BuildRequires: python3-nose
+%endif
+BuildRequires: /usr/bin/2to3
+%endif # if with_python3
+
+%description
+Mako is a template library written in Python. It provides a familiar, non-XML
+syntax which compiles into Python modules for maximum performance. Mako's
+syntax and API borrows from the best ideas of many others, including Django
+templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
+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.
+
+%if 0%{?with_python3}
+%package -n python3-mako0.4
+Summary: Mako template library for Python 3
+Group: Development/Languages
+Requires: python3-beaker
+Requires: python3-markupsafe
+Requires: python3-setuptools
+
+%description -n python3-mako0.4
+Mako is a template library written in Python. It provides a familiar, non-XML
+syntax which compiles into Python modules for maximum performance. Mako's
+syntax and API borrows from the best ideas of many others, including Django
+templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded
+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
+%setup -q -n Mako-%{version}
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif # with_python3
+
+%build
+%{__python} setup.py bdist_egg
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+2to3 --no-diffs -w mako test
+%{__python3} setup.py bdist_egg
+popd
+%endif # with_python3
+
+
+%install
+rm -rf %{buildroot}
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+mkdir -p %{buildroot}%{python3_sitelib}
+easy_install-%{python3_version} -m --prefix %{buildroot}%{_usr} dist/*.egg
+mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/python3-mako-render-0.4
+
+# because some versions of setuptools set all modules executable
+find %{buildroot}%{python3_sitelib} -type f -exec chmod 0644 \{\} \;
+chmod 0755 %{buildroot}%{python3_sitelib}/*/EGG-INFO/scripts/*
+popd
+%endif # with_python3
+
+mkdir -p %{buildroot}%{python_sitelib}
+easy_install -m --prefix %{buildroot}%{_usr} dist/*.egg
+mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/mako-render-0.4
+
+# because some versions of setuptools set all modules executable
+find %{buildroot}%{python_sitelib} -type f -exec chmod 0644 \{\} \;
+chmod 0755 %{buildroot}%{python_sitelib}/*/EGG-INFO/scripts/*
+
+# These are supporting files for building the docs.  No need to ship
+rm -rf doc/build
+
+%check
+PYTHONPATH=$(pwd) nosetests
+
+%if 0%{?with_python3} && 0%{?fedora} > 14
+pushd %{py3dir}
+PYTHONPATH=$(pwd) nosetests-%{python3_version}
+popd
+%endif
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGES LICENSE README doc examples
+%{_bindir}/mako-render-0.4
+%{python_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-mako0.4
+%defattr(-,root,root,-)
+%doc CHANGES LICENSE README doc examples
+%{_bindir}/python3-mako-render-0.4
+%{python3_sitelib}/*
+%endif
+
+%changelog
+* Tue Sep 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-7
+- Keep executable on the render script
+- Fix double install of the python3 module
+- Fix python3 subpackage name
+
+* Tue Sep 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-6
+- Fix for easy_install creating all files with executable bit set
+
+* Tue Sep 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-5
+- Conditionalize definition of python3_version to document when it can be removed
+
+* Tue Sep 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-4
+- Use a macro for python3 interpreter version
+- Add beaker as a BuildRequire so its there for the unittests
+
+* Tue Sep 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-3
+- Include more files as %%doc
+- Clarify license with respect to docs
+
+* Tue Sep 6 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-2
+- Use eggs to move this into a private directory
+
+* Mon Sep 5 2011 Toshio Kuratomi <toshio at fedoraproject.org> - 0.4.2-1
+- Initial build.  Based on the python-mako package.
diff --git a/sources b/sources
index e69de29..34945e5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2ff0747e611b37d44e6409c4e0a80a08  Mako-0.4.2.tar.gz


More information about the scm-commits mailing list