[packages/tevent] - updated to 0.9.39 - added python3- package

qboosh qboosh at pld-linux.org
Thu Mar 14 05:43:11 CET 2019


commit 429b086b7f8a9875c442616f6e505ff57d372fc8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Mar 14 05:48:45 2019 +0100

    - updated to 0.9.39
    - added python3- package

 tevent.spec | 66 ++++++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 50 insertions(+), 16 deletions(-)
---
diff --git a/tevent.spec b/tevent.spec
index 3f5f80c..773d448 100644
--- a/tevent.spec
+++ b/tevent.spec
@@ -1,18 +1,26 @@
+#
+# Conditional build:
+%bcond_without	python2	# CPython 2.x binding
+
 Summary:	An event system library
 Summary(pl.UTF-8):	Biblioteka systemu zdarzeń
 Name:		tevent
-Version:	0.9.37
+Version:	0.9.39
 Release:	1
 License:	LGPL v3+
 Group:		Libraries
 Source0:	https://www.samba.org/ftp/tevent/%{name}-%{version}.tar.gz
-# Source0-md5:	6859cd4081fdb2a76b1cb4bf1c803a59
+# Source0-md5:	b937d5e980fa9704f20b57df688845c0
 URL:		http://tevent.samba.org/
-BuildRequires:	talloc-devel >= 2:2.1.13
+%if %{with python2}
 BuildRequires:	python-devel >= 1:2.4.2
-BuildRequires:	python-talloc-devel >= 2:2.1.13
+BuildRequires:	python-talloc-devel >= 2:2.1.16
+%endif
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-talloc-devel >= 2:2.1.16
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.219
+BuildRequires:	rpmbuild(macros) >= 1.507
+BuildRequires:	talloc-devel >= 2:2.1.16
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -41,7 +49,7 @@ Summary:	Header files for tevent library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki tevent
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	talloc-devel >= 2:2.1.13
+Requires:	talloc-devel >= 2:2.1.16
 
 %description devel
 Header files for tevent library.
@@ -50,31 +58,44 @@ Header files for tevent library.
 Pliki nagłówkowe biblioteki tevent.
 
 %package -n python-tevent
-Summary:	Python bindings for tevent
-Summary(pl.UTF-8):	Pythonowy interfejs do tevent
+Summary:	Python 2 bindings for tevent
+Summary(pl.UTF-8):	Interfejs Pythona 2 do tevent
 Group:		Libraries/Python
 Requires:	%{name} = %{version}-%{release}
-Requires:	python-talloc >= 2:2.1.13
-%pyrequires_eq  python-libs
+Requires:	python-talloc >= 2:2.1.16
 
 %description -n python-tevent
-Python bindings for tevent.
+Python 2 bindings for tevent.
 
 %description -n python-tevent -l pl.UTF-8
-Pythonowy interfejs do tevent.
+Interfejs Pythona 2 do tevent.
+
+%package -n python3-tevent
+Summary:	Python 3 bindings for tevent
+Summary(pl.UTF-8):	Interfejs Pythona 3 do tevent
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python3-talloc >= 2:2.1.16
+
+%description -n python3-tevent
+Python 3 bindings for tevent.
+
+%description -n python3-tevent -l pl.UTF-8
+Interfejs Pythona 3 do tevent.
 
 %prep
 %setup -q
 
 %build
-# note: configure in fact is waf call
+export JOBS=1
+
 CC="%{__cc}" \
 CFLAGS="%{rpmcflags}" \
-PYTHONDIR=%{py_sitedir} \
-./configure \
+%{__python3} buildtools/bin/waf configure \
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
-	--disable-rpath
+	--disable-rpath \
+	%{?with_python2:--extra-python=%{__python}}
 
 %{__make} \
 	V=1
@@ -85,9 +106,14 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with python2}
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
+%endif
+
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -106,7 +132,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/tevent.h
 %{_pkgconfigdir}/tevent.pc
 
+%if %{with python2}
 %files -n python-tevent
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/_tevent.so
 %{py_sitedir}/tevent.py[co]
+%endif
+
+%files -n python3-tevent
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/_tevent.cpython-*.so
+%{py3_sitedir}/tevent.py
+%{py3_sitedir}/__pycache__/tevent.cpython-*.py[co]
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tevent.git/commitdiff/429b086b7f8a9875c442616f6e505ff57d372fc8



More information about the pld-cvs-commit mailing list