[packages/python-augeas] up to 0.4.1; add python3 package

glen glen at pld-linux.org
Tue Jan 14 23:33:46 CET 2014


commit 9228012ccb3160e232abc03fdb69b227c91e6fd9
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jan 15 00:33:30 2014 +0200

    up to 0.4.1; add python3 package
    
    python3 package is disabled as it gets syntax errors

 python-augeas.spec | 70 ++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 60 insertions(+), 10 deletions(-)
---
diff --git a/python-augeas.spec b/python-augeas.spec
index b7995ba..2eff68d 100644
--- a/python-augeas.spec
+++ b/python-augeas.spec
@@ -1,16 +1,27 @@
+#
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module
+
+%define 	module	augeas
 Summary:	Python bindings to augeas
 Summary(pl.UTF-8):	Wiązania Pythona do augeasa
-Name:		python-augeas
-Version:	0.4.0
+Name:		python-%{module}
+Version:	0.4.1
 Release:	1
 License:	LGPL v2.1+
-Group:		Development/Languages/Python
-Source0:	http://augeas.net/download/python/%{name}-%{version}.tar.gz
-# Source0-md5:	2c0c38686f6085168cf8591ef0251748
+Group:		Libraries/Python
+Source0:	https://fedorahosted.org/released/python-augeas/%{name}-%{version}.tar.gz
+# Source0-md5:	cf5742a6e84c1cc894cedd1984aaa915
 URL:		http://augeas.net/
-BuildRequires:	python-devel
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.219
+%if %{with python2}
+BuildRequires:	python-devel
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel
+%endif
 # library is dlopened
 Requires:	augeas-libs
 Requires:	python-modules
@@ -23,27 +34,66 @@ Pure Python bindings to augeas.
 %description -l pl.UTF-8
 Czysto pythonowe wiązania do augeasa.
 
+%package -n python3-%{module}
+Summary:	Python bindings to augeas
+Summary(pl.UTF-8):	Wiązania Pythona do augeasa
+Group:		Libraries/Python
+
+%description -n python3-%{module}
+Pure Python bindings to augeas.
+
+%description -n python3-%{module} -l pl.UTF-8
+Czysto pythonowe wiązania do augeasa.
+
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
 
 %build
-%{__python} setup.py build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2
+%endif
+
+%if %{with python3}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python3} setup.py build --build-base build-3
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
+%if %{with python2}
+%{__python} setup.py \
+	build --build-base build-2 \
+	install --skip-build \
 	--optimize=2 \
 	--root=$RPM_BUILD_ROOT
 
 %py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+	build --build-base build-3 \
+	install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README.txt
 %{py_sitescriptdir}/augeas.py[co]
-%if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/python_augeas-%{version}-py*.egg-info
 %endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc AUTHORS README.txt
+%{py3_sitescriptdir}/augeas.py
+%{py3_sitescriptdir}/python_augeas-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-augeas.git/commitdiff/9228012ccb3160e232abc03fdb69b227c91e6fd9



More information about the pld-cvs-commit mailing list