diff --git a/pexpect-4.6.tar.gz b/pexpect-4.6.tar.gz deleted file mode 100644 index acfd7dbd70c94c03c70e180f3c00dba76801bfcb..0000000000000000000000000000000000000000 Binary files a/pexpect-4.6.tar.gz and /dev/null differ diff --git a/pexpect-4.8.0.tar.gz b/pexpect-4.8.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7e2b9d167d97ad35a5a37f49127bc3656828158c Binary files /dev/null and b/pexpect-4.8.0.tar.gz differ diff --git a/python-pexpect.spec b/python-pexpect.spec index 36b3d43b640bc2d2682ee7abd85730e3058c5597..6680d2962eb880aef95a8b1727cda4a95b10365f 100644 --- a/python-pexpect.spec +++ b/python-pexpect.spec @@ -1,14 +1,14 @@ -%bcond_with check - -Name: python-pexpect -Version: 4.6 -Release: 2 -Summary: Pure Python Expect-like module -License: MIT -URL: https://github.com/pexpect/pexpect -Source0: %{url}/archive/%{version}/pexpect-%{version}.tar.gz -BuildRequires: man -BuildArch: noarch +%global _empty_manifest_terminate_build 0 +Name: python-pexpect +Version: 4.8.0 +Release: 1 +Summary: Pexpect allows easy control of interactive console applications. +License: ISC license +URL: https://pexpect.readthedocs.io/ +Source0: https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz +BuildArch: noarch + +Requires: python3-ptyprocess %description Pexpect is a pure Python module for spawning child applications; controlling @@ -16,83 +16,88 @@ 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. -%package -n python2-pexpect -Summary: Unicode-aware Pure Python Expect-like module -%{?python_provide:%python_provide python2-pexpect} -BuildRequires: python2-devel python2-pytest python2-ptyprocess -Requires: python2-ptyprocess -Provides: pexpect = %{version}-%{release} -Obsoletes: pexpect <= 2.3-20 - -%description -n python2-pexpect -The python2-pexpect package contains the python2 version of Pexpect that allows your -script to spawn a child application and control it as if a human were typing commands. +Pexpect can be used for automating interactive applications such as ssh, ftp, +passwd, telnet, etc. It can be used to a automate setup scripts for duplicating +software package installations on different servers. It can be used for +automated software testing. Pexpect is in the spirit of Don Libes' Expect, but +Pexpect is pure Python. %package -n python3-pexpect -Summary: Unicode-aware Pure Python Expect-like module -%{?python_provide:%python_provide python3-pexpect} -BuildRequires: python3-devel python3-pytest python3-ptyprocess -Requires: python3-ptyprocess +Summary: Pexpect allows easy control of interactive console applications. +Provides: python-pexpect +BuildRequires: python3-devel python3-setuptools %description -n python3-pexpect -The python3-pexpect package contains the python3 version of Pexpect that allows your -script to spawn a child application and control it as if a human were typing commands. +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. -%prep -%autosetup -c -p1 -mv pexpect-%{version} python2 -chmod +x python2/tools/* -chmod a-x python2/examples/* -cp -pr python2 python3 +Pexpect can be used for automating interactive applications such as ssh, ftp, +passwd, telnet, etc. It can be used to a automate setup scripts for duplicating +software package installations on different servers. It can be used for +automated software testing. Pexpect is in the spirit of Don Libes' Expect, but +Pexpect is pure Python. -find python2 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|' -find python3 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|' +%package help +Summary: Development documents and examples for pexpect +Provides: python3-pexpect-doc -%build -cd python2 - %py2_build -cd ../python3 - %py3_build +%description help +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. + +Pexpect can be used for automating interactive applications such as ssh, ftp, +passwd, telnet, etc. It can be used to a automate setup scripts for duplicating +software package installations on different servers. It can be used for +automated software testing. Pexpect is in the spirit of Don Libes' Expect, but +Pexpect is pure Python. +%prep +%autosetup -n pexpect-4.8.0 + +%build +%py3_build %install -cd python2 - %py2_install - rm -rf ${buildroot}%{python2_sitelib}/setuptools/tests - rm -f %{buildroot}%{python2_sitelib}/pexpect/_async.py -cd ../python3 - %py3_install - rm -rf %{buildroot}%{python3_sitelib}/pexpect/tests - -%if %{with check} -%check -export PYTHONIOENCODING=UTF-8 -export LC_ALL="en_US.UTF-8" - -cd python2 - %{__python2} ./tools/display-sighandlers.py - %{__python2} ./tools/display-terminalinfo.py - PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} ./tools/display-maxcanon.py - py.test-2 --verbose -cd ../python3 - %{__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-pexpect -%license python2/LICENSE -%doc python2/doc python2/examples -%{python2_sitelib}/pexpect/ -%{python2_sitelib}/pexpect-*.egg-info - -%files -n python3-pexpect -%license python3/LICENSE -%doc python3/doc python3/examples -%{python3_sitelib}/pexpect/ -%{python3_sitelib}/pexpect-*.egg-info +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pexpect -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* %changelog +* Mon Oct 12 2020 wangxiao - 4.8.0-1 +- upgrade to 4.8.0, add yaml file + * Thu Oct 17 2019 Lijin Yang - 4.6-2 - Package init diff --git a/python-pexpect.yaml b/python-pexpect.yaml new file mode 100644 index 0000000000000000000000000000000000000000..09997f7cbb0787d09ec4a8bbfba4e97513bdf158 --- /dev/null +++ b/python-pexpect.yaml @@ -0,0 +1,4 @@ +version_control: pypi +src_repo: pexpect +tag_prefix: "" +seperator: "."