2 %bcond_with tests # do not perform "make test"
3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module asterisk
7 Summary: A Python Interface to Asterisk
12 Group: Libraries/Python
13 Source0: https://github.com/rdegges/pyst2/archive/%{version}.tar.gz
14 # Source0-md5: f9a99a43008ca9b6d5ef6ff6e1b60712
15 URL: https://pypi.python.org/pypi/pyst2
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python-modules
20 BuildRequires: python-setuptools
23 BuildRequires: python3-modules
24 BuildRequires: python3-setuptools
26 Requires: python-modules
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 pyst2 consists of a set of interfaces and libraries to allow
32 programming of Asterisk from python. The library currently supports
33 AGI, AMI, and the parsing of Asterisk configuration files. The library
34 also includes debugging facilities for AGI.
36 %package -n python3-%{module}
37 Summary: A Python Interface to Asterisk
38 Group: Libraries/Python
39 Requires: python3-modules
41 %description -n python3-%{module}
42 pyst2 consists of a set of interfaces and libraries to allow
43 programming of Asterisk from python. The library currently supports
44 AGI, AMI, and the parsing of Asterisk configuration files. The library
45 also includes debugging facilities for AGI.
48 %setup -q -n pyst2-%{version}
52 %py_build %{?with_tests:test}
56 %py3_build %{?with_tests:test}
60 rm -rf $RPM_BUILD_ROOT
65 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
66 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
76 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
81 %doc CHANGELOG README.rst
82 %{py_sitescriptdir}/%{module}
83 %{py_sitescriptdir}/pyst2-%{version}-py*.egg-info
87 %files -n python3-%{module}
88 %defattr(644,root,root,755)
89 %doc CHANGELOG README.rst
90 %{py3_sitescriptdir}/%{module}
91 %{py3_sitescriptdir}/pyst2-%{version}-py*.egg-info