| |
@@ -5,7 +5,7 @@
|
| |
Name: python-%{modname}
|
| |
Summary: Unicode-aware Pure Python Expect-like module
|
| |
Version: 4.6
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
|
| |
License: MIT
|
| |
URL: https://github.com/pexpect/pexpect
|
| |
@@ -30,40 +30,14 @@
|
| |
compiled. It should work on any platform that supports the standard Python
|
| |
pty module.
|
| |
|
| |
- %package -n python2-%{modname}
|
| |
+ %package -n python%{python3_pkgversion}-%{modname}
|
| |
Summary: %{summary}
|
| |
- %{?python_provide:%python_provide python2-%{modname}}
|
| |
- BuildRequires: python2-devel
|
| |
- BuildRequires: python2-pytest
|
| |
- BuildRequires: python2-ptyprocess
|
| |
- Requires: python2-ptyprocess
|
| |
- Provides: pexpect = %{version}-%{release}
|
| |
- Obsoletes: pexpect <= 2.3-20
|
| |
-
|
| |
- %description -n python2-pexpect
|
| |
- Pexpect is a pure Python module for spawning child applications; controlling
|
| |
- them; and responding to expected patterns in their output. Pexpect works like
|
| |
- Don Libes' Expect. Pexpect allows your script to spawn a child application and
|
| |
- control it as if a human were typing commands. This package contains the
|
| |
- python2 version of this module.
|
| |
+ BuildRequires: python%{python3_pkgversion}-devel
|
| |
+ BuildRequires: python%{python3_pkgversion}-pytest
|
| |
+ BuildRequires: python%{python3_pkgversion}-ptyprocess
|
| |
+ Requires: python%{python3_pkgversion}-ptyprocess
|
| |
|
| |
- Pexpect can be used for automating interactive applications such as ssh, ftp,
|
| |
- passwd, telnet, etc. It can be used to automate setup scripts for duplicating
|
| |
- software package installations on different servers. And it can be used for
|
| |
- automated software testing. Pexpect is in the spirit of Don Libes' Expect, but
|
| |
- Pexpect is pure Python. Unlike other Expect-like modules for Python, Pexpect
|
| |
- does not require TCL or Expect nor does it require C extensions to be
|
| |
- compiled. It should work on any platform that supports the standard Python
|
| |
- pty module.
|
| |
-
|
| |
- %package -n python3-%{modname}
|
| |
- Summary: %{summary}
|
| |
- BuildRequires: python34-devel
|
| |
- BuildRequires: python34-pytest
|
| |
- BuildRequires: python34-ptyprocess
|
| |
- Requires: python34-ptyprocess
|
| |
-
|
| |
- %description -n python3-%{modname}
|
| |
+ %description -n python%{python3_pkgversion}-%{modname}
|
| |
Pexpect is a pure Python module for spawning child applications; controlling
|
| |
them; and responding to expected patterns in their output. Pexpect works like
|
| |
Don Libes' Expect. Pexpect allows your script to spawn a child application and
|
| |
@@ -80,70 +54,39 @@
|
| |
pty module.
|
| |
|
| |
%prep
|
| |
- %autosetup -c
|
| |
- mv %{modname}-%{version} python2
|
| |
- chmod +x python2/tools/*
|
| |
- find python2/examples -type f | xargs chmod a-x
|
| |
- cp -pr python2 python3
|
| |
-
|
| |
- find python2 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|'
|
| |
- find python3 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|'
|
| |
+ %autosetup -n %{modname}-%{version}
|
| |
+ chmod +x tools/*
|
| |
+ find examples -type f | xargs chmod a-x
|
| |
+ find . -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|'
|
| |
|
| |
%build
|
| |
- pushd python2
|
| |
- %py2_build
|
| |
- popd
|
| |
-
|
| |
- pushd python3
|
| |
- %py3_build
|
| |
- popd
|
| |
+ %py3_build
|
| |
|
| |
%install
|
| |
- pushd python2
|
| |
- %py2_install
|
| |
- rm -rf ${buildroot}%{python2_sitelib}/setuptools/tests
|
| |
- # Drop asyncio stuff from py2
|
| |
- rm -f %{buildroot}%{python2_sitelib}/%{modname}/_async.py
|
| |
- popd
|
| |
-
|
| |
- pushd python3
|
| |
- %py3_install
|
| |
- rm -rf %{buildroot}%{python3_sitelib}/pexpect/tests
|
| |
- popd
|
| |
+ %py3_install
|
| |
+ rm -rf %{buildroot}%{python3_sitelib}/pexpect/tests
|
| |
|
| |
%if %{with check}
|
| |
%check
|
| |
export PYTHONIOENCODING=UTF-8
|
| |
export LC_ALL="en_US.UTF-8"
|
| |
|
| |
- pushd python2
|
| |
- %{__python2} ./tools/display-sighandlers.py
|
| |
- %{__python2} ./tools/display-terminalinfo.py
|
| |
- PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} ./tools/display-maxcanon.py
|
| |
- py.test-2 --verbose
|
| |
- popd
|
| |
-
|
| |
- pushd python3
|
| |
- %{__python3} ./tools/display-sighandlers.py
|
| |
- %{__python3} ./tools/display-terminalinfo.py
|
| |
- PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} ./tools/display-maxcanon.py
|
| |
- py.test-3 --verbose
|
| |
- popd
|
| |
+ %{__python3} ./tools/display-sighandlers.py
|
| |
+ %{__python3} ./tools/display-terminalinfo.py
|
| |
+ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} ./tools/display-maxcanon.py
|
| |
+ py.test-3 --verbose
|
| |
%endif
|
| |
|
| |
- %files -n python2-%{modname}
|
| |
- %license python2/LICENSE
|
| |
- %doc python2/doc python2/examples
|
| |
- %{python2_sitelib}/%{modname}/
|
| |
- %{python2_sitelib}/%{modname}-*.egg-info
|
| |
-
|
| |
- %files -n python3-%{modname}
|
| |
- %license python3/LICENSE
|
| |
- %doc python3/doc python3/examples
|
| |
+ %files -n python%{python3_pkgversion}-%{modname}
|
| |
+ %license LICENSE
|
| |
+ %doc doc examples
|
| |
%{python3_sitelib}/%{modname}/
|
| |
%{python3_sitelib}/%{modname}-*.egg-info
|
| |
|
| |
%changelog
|
| |
+ * Tue Oct 29 2019 Scott Talbert <swt@techie.net> - 4.6-2
|
| |
+ - Fix for Python 3.6 in EPEL; remove Python 2 module as it exists in RHEL
|
| |
+
|
| |
* Wed Jul 25 2018 Dan Radez <dradez@redhat.com> - 4.6-1
|
| |
- update to 4.6
|
| |
|
| |