3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests [require ptys support, so not on builders]
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Run a subprocess in a pseudo terminal
9 Summary(pl.UTF-8): Uruchamianie podprocesu w pseudoterminalu
10 Name: python-ptyprocess
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/ptyprocess/
16 Source0: https://files.pythonhosted.org/packages/source/p/ptyprocess/ptyprocess-%{version}.tar.gz
17 # Source0-md5: 37402d69f3b50913d4d483587bffad8f
18 URL: https://github.com/pexpect/ptyprocess
20 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python3-modules >= 1:3.2
25 %{?with_doc:BuildRequires: sphinx-pdg}
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.714
28 Requires: python-modules >= 1:2.7
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Python 2 module to launch a subprocess in a pseudo terminal (pty), and
34 interact with both the process and its pty.
36 Sometimes, piping stdin and stdout is not enough. There might be a
37 password prompt that doesn't read from stdin, output that changes when
38 it's going to a pipe rather than a terminal, or curses-style
39 interfaces that rely on a terminal. If you need to automate these
40 things, running the process in a pseudo terminal (pty) is the answer.
42 %description -l pl.UTF-8
43 Moduł Pythona 2 do uruchamiania podprocesu w pseudoterminalu (pty) i
44 interakcji zarówno z procesem, jak i jego terminalem.
46 Czasem przekazywanie stdin i stdout przez potoki nie wystarcza. Może
47 tak być w przypadku zapytania o hasło nie czytającego ze standardowego
48 wejścia, a i wyjście czasem się zmienia, jeśli jest potokiem, a nie
49 terminalem, lub interfejsem w stylu curses zależnym od terminala.
50 Aby zautomatyzować takie sytuacje, rozwiązaniem jest uruchomienie
51 procesu w pseudoterminalu (pty).
53 %package -n python3-ptyprocess
54 Summary: Run a subprocess in a pseudo terminal
55 Summary(pl.UTF-8): Uruchamianie podprocesu w pseudoterminalu
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.2
59 %description -n python3-ptyprocess
60 Python 3 module to launch a subprocess in a pseudo terminal (pty), and
61 interact with both the process and its pty.
63 Sometimes, piping stdin and stdout is not enough. There might be a
64 password prompt that doesn't read from stdin, output that changes when
65 it's going to a pipe rather than a terminal, or curses-style
66 interfaces that rely on a terminal. If you need to automate these
67 things, running the process in a pseudo terminal (pty) is the answer.
69 %description -n python3-ptyprocess -l pl.UTF-8
70 Moduł Pythona 3 do uruchamiania podprocesu w pseudoterminalu (pty) i
71 interakcji zarówno z procesem, jak i jego terminalem.
73 Czasem przekazywanie stdin i stdout przez potoki nie wystarcza. Może
74 tak być w przypadku zapytania o hasło nie czytającego ze standardowego
75 wejścia, a i wyjście czasem się zmienia, jeśli jest potokiem, a nie
76 terminalem, lub interfejsem w stylu curses zależnym od terminala.
77 Aby zautomatyzować takie sytuacje, rozwiązaniem jest uruchomienie
78 procesu w pseudoterminalu (pty).
81 Summary: ptyprocess API documentation
82 Summary(pl.UTF-8): Dokumentacja API ptyprocess
86 API documentation for ptyprocess.
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API ptyprocess.
92 %setup -q -n ptyprocess-%{version}
98 %{?with_tests:%{__python} -m unittest discover -s tests}
104 %{?with_tests:%{__python3} -m unittest discover -s tests}
109 %{__make} -C docs html
113 rm -rf $RPM_BUILD_ROOT
126 rm -rf $RPM_BUILD_ROOT
130 %defattr(644,root,root,755)
131 %doc LICENSE README.rst
132 %{py_sitescriptdir}/ptyprocess
133 %{py_sitescriptdir}/ptyprocess-%{version}-py*.egg-info
137 %files -n python3-ptyprocess
138 %defattr(644,root,root,755)
139 %doc LICENSE README.rst
140 %{py3_sitescriptdir}/ptyprocess
141 %{py3_sitescriptdir}/ptyprocess-%{version}-py*.egg-info
146 %defattr(644,root,root,755)
147 %doc docs/_build/html/{_images,_static,*.html,*.js}