3 %bcond_without tests # do not perform "make test"
5 %define module sleekxmpp
6 Summary: Flexible XMPP client/component/server library for Python
11 Group: Libraries/Python
12 Source0: http://pypi.python.org/packages/source/s/sleekxmpp/%{module}-%{version}.tar.gz
13 # Source0-md5: 95f847b64fb84483acfadce425fe42cf
14 URL: https://github.com/fritzy/SleekXMPP
15 BuildRequires: python-devel
16 BuildRequires: python3-devel
17 BuildRequires: rpmbuild(macros) >= 1.219
22 Requires: python-pyasn1
23 Requires: python-pyasn1_modules
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 SleekXMPP is a flexible XMPP library for python that allows you to
29 create clients, components or servers for the XMPP protocol. Plug-ins
30 can be create to cover every current or future XEP.
32 %package -n python3-sleekxmpp
33 Summary: Flexible XMPP client/component/server library for Python
34 Group: Libraries/Python
37 %description -n python3-sleekxmpp
38 SleekXMPP is a flexible XMPP library for python that allows you to
39 create clients, components or servers for the XMPP protocol. Plug-ins
40 can be create to cover every current or future XEP.
43 %setup -q -n %{module}-%{version}
49 %{__python} setup.py build
51 %{__python3} setup.py build
55 %{__python} testall.py
57 %{__python3} testall.py
61 rm -rf $RPM_BUILD_ROOT
62 %{__python} setup.py install \
65 --root $RPM_BUILD_ROOT
67 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/sleekxmpp/test
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
71 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
74 %{__python3} setup.py install \
77 --root $RPM_BUILD_ROOT
79 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sleekxmpp/test
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
82 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
85 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc LICENSE README.rst
90 %dir %{py_sitescriptdir}/sleekxmpp
91 %{py_sitescriptdir}/sleekxmpp/*.py[co]
92 %{py_sitescriptdir}/sleekxmpp-%{version}-*.egg-info
93 %{py_sitescriptdir}/sleekxmpp/features
94 %{py_sitescriptdir}/sleekxmpp/plugins
95 %{py_sitescriptdir}/sleekxmpp/roster
96 %{py_sitescriptdir}/sleekxmpp/stanza
97 %{py_sitescriptdir}/sleekxmpp/thirdparty
98 %{py_sitescriptdir}/sleekxmpp/util
99 %{py_sitescriptdir}/sleekxmpp/xmlstream
100 %{_examplesdir}/python-%{module}-%{version}
102 %files -n python3-sleekxmpp
103 %defattr(644,root,root,755)
104 %doc LICENSE README.rst
105 %dir %{py3_sitescriptdir}/sleekxmpp
106 %{py3_sitescriptdir}/sleekxmpp/*.py
107 %{py3_sitescriptdir}/sleekxmpp/__pycache__
108 %{py3_sitescriptdir}/sleekxmpp/features
109 %{py3_sitescriptdir}/sleekxmpp/plugins
110 %{py3_sitescriptdir}/sleekxmpp/roster
111 %{py3_sitescriptdir}/sleekxmpp/stanza
112 %{py3_sitescriptdir}/sleekxmpp/thirdparty
113 %{py3_sitescriptdir}/sleekxmpp/util
114 %{py3_sitescriptdir}/sleekxmpp/xmlstream
115 %{py3_sitescriptdir}/sleekxmpp-%{version}-*.egg-info
116 %{_examplesdir}/python3-%{module}-%{version}