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