packages: python-Mako/python-Mako.spec - updated to 0.3.2 - build python2 a...
wiget
wiget at pld-linux.org
Sat Mar 27 18:59:09 CET 2010
Author: wiget Date: Sat Mar 27 17:59:09 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- updated to 0.3.2
- build python2 and python3 versions from one spec
---- Files affected:
packages/python-Mako:
python-Mako.spec (1.5 -> 1.6)
---- Diffs:
================================================================
Index: packages/python-Mako/python-Mako.spec
diff -u packages/python-Mako/python-Mako.spec:1.5 packages/python-Mako/python-Mako.spec:1.6
--- packages/python-Mako/python-Mako.spec:1.5 Thu Mar 11 18:43:19 2010
+++ packages/python-Mako/python-Mako.spec Sat Mar 27 18:59:03 2010
@@ -1,20 +1,32 @@
# $Revision$, $Date$
+# TODO:
+# - examples subpackage
+#
+%bcond_without python2
+%bcond_without python3
+#
%define fname Mako
Summary: Templating system for Python
Summary(pl.UTF-8): System szablonów dla języka Python
Name: python-%{fname}
-Version: 0.3.1
+Version: 0.3.2
Release: 1
License: MIT
Group: Libraries/Python
Source0: http://cheeseshop.python.org/packages/source/M/Mako/%{fname}-%{version}.tar.gz
-# Source0-md5: 910550812aba6b3e05ffe15c3f68199e
+# Source0-md5: 4fc68467ee226111e102510054ae1e51
URL: http://www.makotemplates.org/
+%if %{with python2}
BuildRequires: python >= 1:2.4
BuildRequires: python-setuptools
+%pyrequires_eq python-modules
+%endif
+%if %{with python3}
+BuildRequires: python3
+BuildRequires: python3-distribute
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
-%pyrequires_eq python-modules
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -28,32 +40,85 @@
przyjazną, nie XML-ową składnię, która jest kompilowana do modułów
Pythona dla zwiększenia wydajności.
+%package -n python3-%{fname}
+Summary: Templating system for Python
+Summary(pl.UTF-8): System szablonów dla języka Python
+Group: Libraries/Python
+
+%description -n python3-%{fname}
+Mako is a template library written in Python. It provides a familiar,
+non-XML syntax which compiles into Python modules for maximum
+performance.
+
+%description -n python3-%{fname} -l pl.UTF-8
+Mako jest biblioteką szablonów napisaną w języku Python. Zapewnia
+przyjazną, nie XML-ową składnię, która jest kompilowana do modułów
+Pythona dla zwiększenia wydajności.
+
%prep
%setup -qn %{fname}-%{version}
%build
-python setup.py build
+%if %{with python2}
+%{__python} setup.py build -b build-2
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build -b build-3
+%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-python setup.py install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
+%if %{with python2}
+%{__python} setup.py \
+ build -b build-2 \
+ install \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+
+mv $RPM_BUILD_ROOT%{_bindir}/mako-render{,-2}
%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+ build -b build-3 \
+ install \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+
+mv $RPM_BUILD_ROOT%{_bindir}/mako-render{,-3}
+
+%py3_postclean
+%endif
+
+ln -s mako-render-2 $RPM_BUILD_ROOT%{_bindir}/mako-render
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES PKG-INFO README
%attr(755,root,root) %{_bindir}/mako-render
+%attr(755,root,root) %{_bindir}/mako-render-2
%{py_sitescriptdir}/mako
%{py_sitescriptdir}/%{fname}-%{version}-py*.egg-info
%{_examplesdir}/%{name}-%{version}
+%endif
+
+%if %{with python3}
+%files -n python3-%{fname}
+%defattr(644,root,root,755)
+%doc CHANGES PKG-INFO README
+%attr(755,root,root) %{_bindir}/mako-render-3
+%{py3_sitescriptdir}/mako
+%{py3_sitescriptdir}/%{fname}-%{version}-py*.egg-info
+%endif
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -61,6 +126,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.6 2010/03/27 17:59:03 wiget
+- updated to 0.3.2
+- build python2 and python3 versions from one spec
+
Revision 1.5 2010/03/11 17:43:19 wiget
- 0.3.1
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python-Mako/python-Mako.spec?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list