]> git.pld-linux.org Git - packages/python-ptyprocess.git/blame - python-ptyprocess.spec
rebuild with tests and docs
[packages/python-ptyprocess.git] / python-ptyprocess.spec
CommitLineData
3588c653
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
636b1ea3 4%bcond_with tests # unit tests [require ptys support, so not on builders]
3588c653
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Run a subprocess in a pseudo terminal
9Summary(pl.UTF-8): Uruchamianie podprocesu w pseudoterminalu
10Name: python-ptyprocess
2f2f805b 11Version: 0.7.0
2da88e82 12Release: 4
3588c653
JB
13License: ISC
14Group: Libraries/Python
de132d64
JB
15#Source0Download: https://pypi.org/simple/ptyprocess/
16Source0: https://files.pythonhosted.org/packages/source/p/ptyprocess/ptyprocess-%{version}.tar.gz
2f2f805b 17# Source0-md5: 9da200c397cb1752209a6b718b6cfc68
3588c653
JB
18URL: https://github.com/pexpect/ptyprocess
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21%endif
22%if %{with python3}
23BuildRequires: python3-modules >= 1:3.2
24%endif
25%{?with_doc:BuildRequires: sphinx-pdg}
26BuildRequires: rpm-pythonprov
27BuildRequires: rpmbuild(macros) >= 1.714
28Requires: python-modules >= 1:2.7
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Python 2 module to launch a subprocess in a pseudo terminal (pty), and
34interact with both the process and its pty.
35
36Sometimes, piping stdin and stdout is not enough. There might be a
37password prompt that doesn't read from stdin, output that changes when
38it's going to a pipe rather than a terminal, or curses-style
39interfaces that rely on a terminal. If you need to automate these
40things, running the process in a pseudo terminal (pty) is the answer.
41
42%description -l pl.UTF-8
43Moduł Pythona 2 do uruchamiania podprocesu w pseudoterminalu (pty) i
44interakcji zarówno z procesem, jak i jego terminalem.
45
46Czasem przekazywanie stdin i stdout przez potoki nie wystarcza. Może
47tak być w przypadku zapytania o hasło nie czytającego ze standardowego
48wejścia, a i wyjście czasem się zmienia, jeśli jest potokiem, a nie
49terminalem, lub interfejsem w stylu curses zależnym od terminala.
50Aby zautomatyzować takie sytuacje, rozwiązaniem jest uruchomienie
51procesu w pseudoterminalu (pty).
52
53%package -n python3-ptyprocess
54Summary: Run a subprocess in a pseudo terminal
55Summary(pl.UTF-8): Uruchamianie podprocesu w pseudoterminalu
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.2
58
59%description -n python3-ptyprocess
60Python 3 module to launch a subprocess in a pseudo terminal (pty), and
61interact with both the process and its pty.
62
63Sometimes, piping stdin and stdout is not enough. There might be a
64password prompt that doesn't read from stdin, output that changes when
65it's going to a pipe rather than a terminal, or curses-style
66interfaces that rely on a terminal. If you need to automate these
67things, running the process in a pseudo terminal (pty) is the answer.
68
69%description -n python3-ptyprocess -l pl.UTF-8
70Moduł Pythona 3 do uruchamiania podprocesu w pseudoterminalu (pty) i
71interakcji zarówno z procesem, jak i jego terminalem.
72
73Czasem przekazywanie stdin i stdout przez potoki nie wystarcza. Może
74tak być w przypadku zapytania o hasło nie czytającego ze standardowego
75wejścia, a i wyjście czasem się zmienia, jeśli jest potokiem, a nie
76terminalem, lub interfejsem w stylu curses zależnym od terminala.
77Aby zautomatyzować takie sytuacje, rozwiązaniem jest uruchomienie
78procesu w pseudoterminalu (pty).
79
80%package apidocs
81Summary: ptyprocess API documentation
82Summary(pl.UTF-8): Dokumentacja API ptyprocess
83Group: Documentation
84
85%description apidocs
86API documentation for ptyprocess.
87
88%description apidocs -l pl.UTF-8
89Dokumentacja API ptyprocess.
90
91%prep
92%setup -q -n ptyprocess-%{version}
93
94%build
95%if %{with python2}
96%py_build
97
98%{?with_tests:%{__python} -m unittest discover -s tests}
99%endif
100
101%if %{with python3}
102%py3_build
103
104%{?with_tests:%{__python3} -m unittest discover -s tests}
105%endif
106
107%if %{with doc}
108PYTHONPATH=$(pwd) \
109%{__make} -C docs html
110%endif
111
112%install
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%py_install
117
118%py_postclean
119%endif
120
121%if %{with python3}
122%py3_install
123%endif
124
125%clean
126rm -rf $RPM_BUILD_ROOT
127
128%if %{with python2}
129%files
130%defattr(644,root,root,755)
131%doc LICENSE README.rst
132%{py_sitescriptdir}/ptyprocess
133%{py_sitescriptdir}/ptyprocess-%{version}-py*.egg-info
134%endif
135
136%if %{with python3}
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
142%endif
143
144%if %{with doc}
145%files apidocs
146%defattr(644,root,root,755)
147%doc docs/_build/html/{_images,_static,*.html,*.js}
148%endif
This page took 0.065068 seconds and 4 git commands to generate.