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
8 Summary: A Python Interface to Asterisk
13 Group: Libraries/Python
14 Source0: https://github.com/rdegges/pyst2/archive/%{version}.tar.gz
15 # Source0-md5: c1e882331d2d3f7fe8da85b3a1e11b10
16 URL: https://pypi.python.org/pypi/pyst2
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-modules
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules
25 BuildRequires: python3-setuptools
27 Requires: python-modules
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 pyst2 consists of a set of interfaces and libraries to allow
33 programming of Asterisk from python. The library currently supports
34 AGI, AMI, and the parsing of Asterisk configuration files. The library
35 also includes debugging facilities for AGI.
37 %package -n python3-%{egg_name}
38 Summary: A Python Interface to Asterisk
39 Group: Libraries/Python
40 Requires: python3-modules
42 %description -n python3-%{egg_name}
43 pyst2 consists of a set of interfaces and libraries to allow
44 programming of Asterisk from python. The library currently supports
45 AGI, AMI, and the parsing of Asterisk configuration files. The library
46 also includes debugging facilities for AGI.
49 %setup -q -n pyst2-%{version}
53 %py_build %{?with_tests:test}
57 %py3_build %{?with_tests:test}
61 rm -rf $RPM_BUILD_ROOT
66 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
67 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
77 rm -rf $RPM_BUILD_ROOT
81 %defattr(644,root,root,755)
82 %doc CHANGELOG README.rst
83 %{py_sitescriptdir}/%{module}
84 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
88 %files -n python3-%{egg_name}
89 %defattr(644,root,root,755)
90 %doc CHANGELOG README.rst
91 %{py3_sitescriptdir}/%{module}
92 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info