[packages/python-Tempita] - updated to 0.5.2, finished packaging
qboosh
qboosh at pld-linux.org
Sat Jan 20 22:13:08 CET 2024
commit 844f02f7bc82a91cd1e1bceca47bc5d03d91ab04
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 20 22:07:05 2024 +0100
- updated to 0.5.2, finished packaging
python-Tempita.spec | 87 +++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 67 insertions(+), 20 deletions(-)
---
diff --git a/python-Tempita.spec b/python-Tempita.spec
index 97e3288..d8fca17 100644
--- a/python-Tempita.spec
+++ b/python-Tempita.spec
@@ -1,52 +1,99 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
%define module Tempita
Summary: A very small text templating language
-Summary(pl.UTF-8): -
+Summary(pl.UTF-8): Bardzo mały język szablonów tekstu
Name: python-%{module}
-Version: 0.4
-Release: 0.2
+Version: 0.5.2
+Release: 1
License: MIT
Group: Development/Languages/Python
-Source0: http://pypi.python.org/packages/source/T/Tempita/%{module}-%{version}.tar.gz
-# Source0-md5: 0abe015a72e748d0c6284679a497426c
-URL: http://pythonpaste.org/tempita/
-BuildRequires: python-devel
+Source0: https://files.pythonhosted.org/packages/source/T/Tempita/%{module}-%{version}.tar.gz
+# Source0-md5: 4c2f17bb9d481821c41b6fbee904cea1
+URL: https://pypi.org/project/Tempita/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.5
BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-2to3 >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
+BuildRequires: sed >= 4.0
+%endif
BuildRequires: rpm-pythonprov
-# if py_postclean is used
-BuildRequires: rpmbuild(macros) >= 1.710
-#Requires: python-libs
-Requires: python-modules
-#BuildArch: noarch
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
A very small text templating language.
%description -l pl.UTF-8
+Bardzo mały język szablonów tekstu.
+
+%package -n python3-Tempita
+Summary: A very small text templating language
+Summary(pl.UTF-8): Bardzo mały język szablonów tekstu
+Group: Development/Languages/Python
+
+%description -n python3-Tempita
+A very small text templating language.
+
+%description -n python3-Tempita -l pl.UTF-8
+Bardzo mały język szablonów tekstu.
%prep
%setup -q -n %{module}-%{version}
+%if %{with python3}
+# 2to3 no longer supported by setuptools
+install -d py3
+cp -p setup.cfg setup.py py3
+%{__sed} -i -e '/use_2to3=/d' py3/setup.py
+2to3-%{py3_ver} tempita -o py3/tempita -n -W
+%endif
+
%build
-# CFLAGS is only for arch packages - remove on noarch packages
+%if %{with python2}
%py_build
+%endif
+
+%if %{with python3}
+cd py3
+%py3_build
+%endif
%install
rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
%py_install
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
%py_postclean
+%endif
+
+%if %{with python3}
+cd py3
+%py3_install
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc docs
-%dir %{py_sitescriptdir}/tempita
-%{py_sitescriptdir}/tempita/*.py[co]
-%if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/%{module}-*.egg-info
+%{py_sitescriptdir}/tempita
+%{py_sitescriptdir}/Tempita-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-Tempita
+%defattr(644,root,root,755)
+%{py3_sitescriptdir}/tempita
+%{py3_sitescriptdir}/Tempita-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-Tempita.git/commitdiff/844f02f7bc82a91cd1e1bceca47bc5d03d91ab04
More information about the pld-cvs-commit
mailing list