diff --git a/python-pexpect.spec b/python-pexpect.spec index bef3e44..ec06b09 100644 --- a/python-pexpect.spec +++ b/python-pexpect.spec @@ -5,7 +5,7 @@ Name: python-%{modname} Summary: Unicode-aware Pure Python Expect-like module Version: 4.7.0 -Release: 3%{?dist} +Release: 4%{?dist} License: ISC URL: https://github.com/pexpect/pexpect @@ -30,32 +30,6 @@ 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 python2-%{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. - -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} %{?python_provide:%python_provide python3-%{modname}} @@ -81,69 +55,42 @@ compiled. It should work on any platform that supports the standard Python 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 +%autosetup -n %{modname}-%{version} +#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}|' +#find python2 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|' +#find python3 -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 -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 +%license LICENSE +%doc doc examples %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-*.egg-info %changelog +* Tue Sep 24 2019 Dan Radez - 4.7.0-4 +- Remove Python2 packaging + * Fri Aug 16 2019 Miro HronĨok - 4.7.0-3 - Rebuilt for Python 3.8