]> git.pld-linux.org Git - packages/python-pexpect.git/blob - python-pexpect.spec
- updated to 4.7.0
[packages/python-pexpect.git] / python-pexpect.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_with     tests   # py.test tests [require ptys, so not on builders]
6 %bcond_without  doc     # Sphinx documentation
7
8 %define         module  pexpect
9 Summary:        Pure Python Expect-like module
10 Summary(pl.UTF-8):      Moduł podobny do narzędzia Expect napisany w czystym Pythonie
11 Name:           python-%{module}
12 Version:        4.7.0
13 Release:        1
14 License:        ISC
15 Group:          Development/Languages/Python
16 #Source0Download: https://pypi.org/simple/pexpect/
17 Source0:        https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
18 # Source0-md5:  ed003242cbf308aee1b1eaecdef59e43
19 URL:            http://pexpect.readthedocs.io/
20 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
21 BuildRequires:  glibc-localedb-all
22 %endif
23 %if %{with python2}
24 BuildRequires:  python-devel >= 1:2.7
25 BuildRequires:  python-modules >= 1:2.7
26 %if %{with tests}
27 BuildRequires:  python-ptyprocess >= 0.5
28 BuildRequires:  python-pytest
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.2
33 %if %{with tests}
34 BuildRequires:  python3-ptyprocess >= 0.5
35 BuildRequires:  python3-pytest
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %if %{with doc}
41 BuildRequires:  sphinx-pdg
42 %endif
43 Requires:       python-modules >= 1:2.7
44 Requires:       python-ptyprocess >= 0.5
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Pexpect is a pure Python module for spawning child applications;
50 controlling them; and responding to expected patterns in their output.
51 Pexpect works like Don Libes' Expect. Pexpect allows your script to
52 spawn a child application and control it as if a human were typing
53 commands.
54
55 %description -l pl.UTF-8
56 Pexpect jest modułem napisanym wyłącznie w Pythonie przeznaczonym do
57 uruchamiania aplikacji i kontroli nad nimi poprzez reagowanie na
58 znalezione wzorce na ich wyjściu. Pexpect działa podobnie do Expecta
59 Dona Libesa - pozwala skryptom z ich poziomu uruchomić inne programy i
60 sprawować nad nimi kontrolę imitując interakcję użytkownika.
61
62 %package -n python3-%{module}
63 Summary:        Pure Python Expect-like module
64 Summary(pl.UTF-8):      Moduł podobny do narzędzia Expect napisany w czystym Pythonie
65 Group:          Development/Languages/Python
66 Requires:       python3-modules >= 1:3.2
67 Requires:       python3-ptyprocess >= 0.5
68
69 %description -n python3-%{module}
70 Pexpect is a pure Python module for spawning child applications;
71 controlling them; and responding to expected patterns in their output.
72 Pexpect works like Don Libes' Expect. Pexpect allows your script to
73 spawn a child application and control it as if a human were typing
74 commands.
75
76 %description -n python3-%{module} -l pl.UTF-8
77 Pexpect jest modułem napisanym wyłącznie w Pythonie przeznaczonym do
78 uruchamiania aplikacji i kontroli nad nimi poprzez reagowanie na
79 znalezione wzorce na ich wyjściu. Pexpect działa podobnie do Expecta
80 Dona Libesa - pozwala skryptom z ich poziomu uruchomić inne programy i
81 sprawować nad nimi kontrolę imitując interakcję użytkownika.
82
83 %package apidocs
84 Summary:        Documentation for Python pexpect module
85 Summary(pl.UTF-8):      Dokumentacja do modułu Pythona pexpect
86 Group:          Documentation
87
88 %description apidocs
89 Documentation for Python pexpect module.
90
91 %description apidocs -l pl.UTF-8
92 Dokumentacja do modułu Pythona pexpect.
93
94 %prep
95 %setup -q -n %{module}-%{version}
96
97 %build
98 %if %{with python2}
99 %py_build
100
101 %{?with_tests:LC_ALL=C.UTF-8 %{__python} -m pytest tests}
102 %endif
103
104 %if %{with python3}
105 %py3_build
106
107 %{?with_tests:LC_ALL=C.UTF-8 %{__python3} -m pytest tests}
108 %endif
109
110 %if %{with doc}
111 %{__make} -C doc html
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %py_install
119
120 %py_postclean
121
122 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/pexpect/bashrc.sh
123
124 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
125 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
126 %endif
127
128 %if %{with python3}
129 %py3_install
130
131 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/pexpect/bashrc.sh
132
133 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
134 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
135 %endif
136
137 %clean
138 rm -rf $RPM_BUILD_ROOT
139
140 %if %{with python2}
141 %files
142 %defattr(644,root,root,755)
143 %doc LICENSE README.rst
144 %{py_sitescriptdir}/pexpect
145 %{py_sitescriptdir}/pexpect-%{version}-py*.egg-info
146 %{_examplesdir}/%{name}-%{version}
147 %endif
148
149 %if %{with python3}
150 %files -n python3-%{module}
151 %defattr(644,root,root,755)
152 %doc LICENSE README.rst
153 %{py3_sitescriptdir}/pexpect
154 %{py3_sitescriptdir}/pexpect-%{version}-py*.egg-info
155 %{_examplesdir}/python3-%{module}-%{version}
156 %endif
157
158 %if %{with doc}
159 %files apidocs
160 %defattr(644,root,root,755)
161 %doc doc/_build/html/{_static,api,*.html,*.js}
162 %endif
This page took 0.078592 seconds and 3 git commands to generate.