]> git.pld-linux.org Git - packages/python-pyst2.git/blame - python-pyst2.spec
Release 5 (by relup.sh)
[packages/python-pyst2.git] / python-pyst2.spec
CommitLineData
97daeaeb
AM
1# Conditional build:
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
5
6%define module asterisk
7%define egg_name pyst2
8Summary: A Python Interface to Asterisk
9Name: python-pyst2
10Version: 0.5.0
6df76841 11Release: 5
97daeaeb
AM
12License: PSF
13Group: Libraries/Python
14Source0: https://github.com/rdegges/pyst2/archive/%{version}.tar.gz
15# Source0-md5: c1e882331d2d3f7fe8da85b3a1e11b10
16URL: https://pypi.python.org/pypi/pyst2
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
20BuildRequires: python-modules
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-modules
25BuildRequires: python3-setuptools
26%endif
27Requires: python-modules
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32pyst2 consists of a set of interfaces and libraries to allow
33programming of Asterisk from python. The library currently supports
34AGI, AMI, and the parsing of Asterisk configuration files. The library
35also includes debugging facilities for AGI.
36
37%package -n python3-%{egg_name}
38Summary: A Python Interface to Asterisk
39Group: Libraries/Python
40Requires: python3-modules
41
42%description -n python3-%{egg_name}
43pyst2 consists of a set of interfaces and libraries to allow
44programming of Asterisk from python. The library currently supports
45AGI, AMI, and the parsing of Asterisk configuration files. The library
46also includes debugging facilities for AGI.
47
48%prep
49%setup -q -n pyst2-%{version}
50
51%build
52%if %{with python2}
53%py_build %{?with_tests:test}
54%endif
55
56%if %{with python3}
57%py3_build %{?with_tests:test}
58%endif
59
60%install
61rm -rf $RPM_BUILD_ROOT
62
63%if %{with python2}
64%py_install
65
66%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
67%py_comp $RPM_BUILD_ROOT%{py_sitedir}
68
69%py_postclean
70%endif
71
72%if %{with python3}
73%py3_install
74%endif
75
76%clean
77rm -rf $RPM_BUILD_ROOT
78
79%if %{with python2}
80%files
81%defattr(644,root,root,755)
82%doc CHANGELOG README.rst
83%{py_sitescriptdir}/%{module}
84%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
85%endif
86
87%if %{with python3}
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
93%endif
This page took 0.333801 seconds and 4 git commands to generate.