diff --git a/.gitignore b/.gitignore index e55a001..2fc2426 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/pexpect-4.3.1.tar.gz +pexpect-4.9.0.tar.gz diff --git a/.python-pexpect.metadata b/.python-pexpect.metadata deleted file mode 100644 index 2e50ccb..0000000 --- a/.python-pexpect.metadata +++ /dev/null @@ -1 +0,0 @@ -5aa3345801eb1dd69980bda9b5cfcc51e2eed9b1 SOURCES/pexpect-4.3.1.tar.gz diff --git a/SPECS/python-pexpect.spec b/python-pexpect.spec similarity index 64% rename from SPECS/python-pexpect.spec rename to python-pexpect.spec index 1d68e1c..e2b6edd 100644 --- a/SPECS/python-pexpect.spec +++ b/python-pexpect.spec @@ -1,25 +1,25 @@ -%bcond_with check - -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 -%else -%bcond_without python2 -%endif +%bcond_without check %global modname pexpect Name: python-%{modname} Summary: Unicode-aware Pure Python Expect-like module -Version: 4.3.1 -Release: 3%{?dist} +Version: 4.9.0 +Release: 6%{?dist} -License: MIT +# All the files have ISC license except the +# following two that have BSD license: +# python-pexpect/pexpect-4.8.0/pexpect/pty_spawn.py +# python-pexpect/pexpect-4.8.0/pexpect/spawnbase.py +License: ISC AND BSD-3-Clause URL: https://github.com/pexpect/pexpect Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz -BuildRequires: %{_bindir}/man -BuildRequires: coreutils +BuildRequires: /usr/bin/man +%if %{with check} +BuildRequires: openssl +BuildRequires: python-unversioned-command +%endif BuildArch: noarch @@ -38,40 +38,14 @@ 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. -%if %{with python2} -%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. -%endif # with python2 - %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-ptyprocess +BuildRequires: zsh Requires: python3-ptyprocess %description -n python3-%{modname} @@ -91,87 +65,145 @@ compiled. It should work on any platform that supports the standard Python pty module. %prep -%autosetup -c - -%if %{with python2} -cp-pr %{modname}-%{version} python2 -chmod +x python2/tools/* -find python2/examples -type f | xargs chmod a-x -%endif # with python2 -cp -pr %{modname}-%{version} python3 -chmod +x python3/tools/* -find python3/examples -type f | xargs chmod a-x - -%if %{with python2} -find python2 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|' -%endif # with python2 -find python3 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|' +%autosetup -n %{modname}-%{version} -p 1 %build -%if %{with python2} -pushd python2 - %py2_build -popd -%endif # with python2 - -pushd python3 - %py3_build -popd +%py3_build %install -%if %{with python2} -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 -%endif # with python2 - -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" +# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1914843 +# upstream: https://github.com/pexpect/pexpect/issues/669 +# There's a patch upstream that we can presumable remove this after +# it merges and is released. +# Thx for the suggestion Miro: https://www.spinics.net/lists/fedora-devel/msg283026.html +echo "set enable-bracketed-paste off" > .inputrc +export INPUTRC=$PWD/.inputrc -%if %{with python2} -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 -%endif # with python2 - -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 +CI=true py.test-3 --verbose %endif -%if %{with python2} -%files -n python2-%{modname} -%license python2/LICENSE -%doc python2/doc python2/examples -%{python2_sitelib}/%{modname}/ -%{python2_sitelib}/%{modname}-*.egg-info -%endif # with python2 - %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 Jun 19 2018 Charalampos Stratakis - 4.3.1-3 -- Conditionalize the python2 subpackage +* Tue Oct 29 2024 Troy Dawson - 4.9.0-6 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 4.9.0-5 +- Bump release for June 2024 mass rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 4.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 4.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Nov 29 2023 Scott Talbert - 4.9.0-2 +- Fix tests when running in CI-like environments (#2251910) + +* Mon Nov 27 2023 Dan Radez - 4.9.0-1 +- Update to new upstream release 4.9.0 (#2251454) + +* Fri Jul 21 2023 Fedora Release Engineering - 4.8.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 4.8.0-16 +- Rebuilt for Python 3.12 + +* Sun Feb 12 2023 Scott Talbert - 4.8.0-15 +- Fix FTBFS with Python 3.12 (#2155493) + +* Fri Jan 20 2023 Fedora Release Engineering - 4.8.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 4.8.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 4.8.0-12 +- Rebuilt for Python 3.11 + +* Thu Mar 24 2022 Scott Talbert - 4.8.0-11 +- Replace asyncio.coroutine to fix Python 3.11 support (#2019843) + +* Fri Jan 21 2022 Fedora Release Engineering - 4.8.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 4.8.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jun 02 2021 Python Maint - 4.8.0-8 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 4.8.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jan 19 2021 Dan Radez - 4.8.0-6 +- adding workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1914843 +- while we wait for upstream fix: https://github.com/pexpect/pexpect/issues/669 + +* Wed Sep 16 2020 Kalev Lember - 4.8.0-5 +- Avoid using bindir macro in BuildRequires + +* Wed Jul 29 2020 Fedora Release Engineering - 4.8.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 4.8.0-3 +- Rebuilt for Python 3.9 + +* Wed Apr 08 2020 Scott Talbert - 4.8.0-2 +- Fix tests when building under COPR (#1822060) + +* Tue Apr 07 2020 Scott Talbert - 4.8.0-1 +- Update to new upstream release 4.8.0 and re-enable tests (#1793613) + +* Thu Jan 30 2020 Fedora Release Engineering - 4.7.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* 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 + +* Fri Jul 26 2019 Fedora Release Engineering - 4.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Apr 11 2019 Dan Radez - 4.7.0-1 +- update to 4.7.0 + +* Sat Feb 02 2019 Fedora Release Engineering - 4.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 4.6-2 +- Drop explicit locale setting + See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot + +* Wed Jul 25 2018 Dan Radez - 4.6-1 +- update to 4.6 + +* Sat Jul 14 2018 Fedora Release Engineering - 4.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 15 2018 Miro Hrončok - 4.5-2 +- Rebuilt for Python 3.7 + +* Wed May 23 2018 Igor Gnatenko - 4.5.0-1 +- Update to 4.5.0 + +* Mon Mar 12 2018 Igor Gnatenko - 4.4.0-1 +- Update to 4.4.0 * Fri Feb 09 2018 Fedora Release Engineering - 4.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources new file mode 100644 index 0000000..4365e33 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pexpect-4.9.0.tar.gz) = bc18a0827e9ab034e2fd010291261cdbda42dab02c6216d097b7569d22688327bac20aa03c8c0826728c9f7ae2a20cd7f673b107aaa4017232141dca1a3fc75b