]> git.pld-linux.org Git - packages/python-asterisk.git/blob - python-asterisk.spec
rebuild with python 3.10
[packages/python-asterisk.git] / python-asterisk.spec
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 Summary:        A Python Interface to Asterisk
8 Name:           python-%{module}
9 Version:        0.4.9
10 Release:        7
11 License:        PSF
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
18 %if %{with python2}
19 BuildRequires:  python-modules
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules
24 BuildRequires:  python3-setuptools
25 %endif
26 Requires:       python-modules
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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.
35
36 %package -n python3-%{module}
37 Summary:        A Python Interface to Asterisk
38 Group:          Libraries/Python
39 Requires:       python3-modules
40
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.
46
47 %prep
48 %setup -q -n pyst2-%{version}
49
50 %build
51 %if %{with python2}
52 %py_build %{?with_tests:test}
53 %endif
54
55 %if %{with python3}
56 %py3_build %{?with_tests:test}
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 %if %{with python2}
63 %py_install
64
65 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
66 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
67
68 %py_postclean
69 %endif
70
71 %if %{with python3}
72 %py3_install
73 %endif
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %files
80 %defattr(644,root,root,755)
81 %doc CHANGELOG README.rst
82 %{py_sitescriptdir}/%{module}
83 %{py_sitescriptdir}/pyst2-%{version}-py*.egg-info
84 %endif
85
86 %if %{with python3}
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
92 %endif
This page took 0.129135 seconds and 3 git commands to generate.