[packages/python-nbxmpp] Version: 0.6.6, Python 3 support
jajcus
jajcus at pld-linux.org
Thu Aug 16 14:46:50 CEST 2018
commit 6d40abb986c57b54511f350c11361b4ad78085ae
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Thu Aug 16 14:46:31 2018 +0200
Version: 0.6.6, Python 3 support
python-nbxmpp.spec | 47 ++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 42 insertions(+), 5 deletions(-)
---
diff --git a/python-nbxmpp.spec b/python-nbxmpp.spec
index 994b01b..2bf734b 100644
--- a/python-nbxmpp.spec
+++ b/python-nbxmpp.spec
@@ -1,17 +1,25 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
%define module nbxmpp
Summary: Non blocking Jabber/XMPP module
Name: python-nbxmpp
-Version: 0.5.5
+Version: 0.6.6
Release: 1
License: GPL v3
Group: Libraries/Python
# https://dev.gajim.org/gajim/python-nbxmpp/tags
-Source0: https://dev.gajim.org/gajim/python-nbxmpp/uploads/ddc27304794916539c0c7b7ca71413a5/nbxmpp-%{version}.tar.gz
-# Source0-md5: d72008dd1b3fb471b72b1272c58a79dc
+Source0: https://files.pythonhosted.org/packages/source/n/%{module}/%{module}-%{version}.tar.gz
+# Source0-md5: e9e0ba25282c892c7618014bbf93244d
URL: https://dev.gajim.org/gajim/python-nbxmpp
-BuildRequires: python-modules
+%if %{with python2}
BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-setuptools
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
Requires: python-pyOpenSSL
@@ -24,16 +32,39 @@ applications to use Jabber/XMPP networks in a non-blocking way. This
library is initialy a fork of xmpppy one, but using non-blocking
sockets.
+%package -n python3-%{module}
+Summary: Non blocking Jabber/XMPP module
+Group: Libraries/Python
+Requires: python3-pyOpenSSL
+
+%description -n python3-%{module}
+python-nbxmpp is a Python library that provides a way for Python
+applications to use Jabber/XMPP networks in a non-blocking way. This
+library is initialy a fork of xmpppy one, but using non-blocking
+sockets.
+
%prep
%setup -q -n %{module}-%{version}
%build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%py_install
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -43,3 +74,9 @@ rm -rf $RPM_BUILD_ROOT
%doc ChangeLog README
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc ChangeLog README
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-nbxmpp.git/commitdiff/6d40abb986c57b54511f350c11361b4ad78085ae
More information about the pld-cvs-commit
mailing list