]>
Commit | Line | Data |
---|---|---|
6d40abb9 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
b686b19e JK |
5 | |
6 | %define module nbxmpp | |
7 | Summary: Non blocking Jabber/XMPP module | |
8 | Name: python-nbxmpp | |
6d40abb9 | 9 | Version: 0.6.6 |
f54970e1 | 10 | Release: 5 |
b686b19e JK |
11 | License: GPL v3 |
12 | Group: Libraries/Python | |
13 | # https://dev.gajim.org/gajim/python-nbxmpp/tags | |
6d40abb9 JK |
14 | Source0: https://files.pythonhosted.org/packages/source/n/%{module}/%{module}-%{version}.tar.gz |
15 | # Source0-md5: e9e0ba25282c892c7618014bbf93244d | |
b686b19e | 16 | URL: https://dev.gajim.org/gajim/python-nbxmpp |
6d40abb9 | 17 | %if %{with python2} |
b686b19e | 18 | BuildRequires: python-setuptools |
6d40abb9 JK |
19 | %endif |
20 | %if %{with python3} | |
21 | BuildRequires: python3-setuptools | |
22 | %endif | |
b686b19e JK |
23 | BuildRequires: rpm-pythonprov |
24 | BuildRequires: rpmbuild(macros) >= 1.714 | |
25 | Requires: python-pyOpenSSL | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | python-nbxmpp is a Python library that provides a way for Python | |
31 | applications to use Jabber/XMPP networks in a non-blocking way. This | |
32 | library is initialy a fork of xmpppy one, but using non-blocking | |
33 | sockets. | |
34 | ||
6d40abb9 JK |
35 | %package -n python3-%{module} |
36 | Summary: Non blocking Jabber/XMPP module | |
37 | Group: Libraries/Python | |
38 | Requires: python3-pyOpenSSL | |
39 | ||
40 | %description -n python3-%{module} | |
41 | python-nbxmpp is a Python library that provides a way for Python | |
42 | applications to use Jabber/XMPP networks in a non-blocking way. This | |
43 | library is initialy a fork of xmpppy one, but using non-blocking | |
44 | sockets. | |
45 | ||
b686b19e JK |
46 | %prep |
47 | %setup -q -n %{module}-%{version} | |
48 | ||
49 | %build | |
6d40abb9 JK |
50 | %if %{with python2} |
51 | %py_build %{?with_tests:test} | |
52 | %endif | |
53 | ||
54 | %if %{with python3} | |
55 | %py3_build %{?with_tests:test} | |
56 | %endif | |
b686b19e JK |
57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
6d40abb9 | 61 | %if %{with python2} |
b686b19e | 62 | %py_install |
6d40abb9 JK |
63 | %endif |
64 | ||
65 | %if %{with python3} | |
66 | %py3_install | |
67 | %endif | |
b686b19e JK |
68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %files | |
73 | %defattr(644,root,root,755) | |
74 | %doc ChangeLog README | |
75 | %{py_sitescriptdir}/%{module} | |
76 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
6d40abb9 JK |
77 | |
78 | %files -n python3-%{module} | |
79 | %defattr(644,root,root,755) | |
80 | %doc ChangeLog README | |
81 | %{py3_sitescriptdir}/%{module} | |
82 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |