!1 upgrade to 4.8.0,add yaml file

From: @wangxiao65
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-10-12 11:30:05 +08:00 committed by Gitee
commit f479d06279
4 changed files with 83 additions and 74 deletions

Binary file not shown.

BIN
pexpect-4.8.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,98 +1,103 @@
%bcond_with check %global _empty_manifest_terminate_build 0
Name: python-pexpect Name: python-pexpect
Version: 4.6 Version: 4.8.0
Release: 2 Release: 1
Summary: Pure Python Expect-like module Summary: Pexpect allows easy control of interactive console applications.
License: MIT License: ISC license
URL: https://github.com/pexpect/pexpect URL: https://pexpect.readthedocs.io/
Source0: %{url}/archive/%{version}/pexpect-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/e5/9b/ff402e0e930e70467a7178abb7c128709a30dfb22d8777c043e501bc1b10/pexpect-4.8.0.tar.gz
BuildRequires: man
BuildArch: noarch BuildArch: noarch
Requires: python3-ptyprocess
%description %description
Pexpect is a pure Python module for spawning child applications; controlling Pexpect is a pure Python module for spawning child applications; controlling
them; and responding to expected patterns in their output. Pexpect works like 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 Don Libes' Expect. Pexpect allows your script to spawn a child application and
control it as if a human were typing commands. control it as if a human were typing commands.
%package -n python2-pexpect Pexpect can be used for automating interactive applications such as ssh, ftp,
Summary: Unicode-aware Pure Python Expect-like module passwd, telnet, etc. It can be used to a automate setup scripts for duplicating
%{?python_provide:%python_provide python2-pexpect} software package installations on different servers. It can be used for
BuildRequires: python2-devel python2-pytest python2-ptyprocess automated software testing. Pexpect is in the spirit of Don Libes' Expect, but
Requires: python2-ptyprocess Pexpect is pure Python.
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.
%package -n python3-pexpect %package -n python3-pexpect
Summary: Unicode-aware Pure Python Expect-like module Summary: Pexpect allows easy control of interactive console applications.
%{?python_provide:%python_provide python3-pexpect} Provides: python-pexpect
BuildRequires: python3-devel python3-pytest python3-ptyprocess BuildRequires: python3-devel python3-setuptools
Requires: python3-ptyprocess
%description -n python3-pexpect %description -n python3-pexpect
The python3-pexpect package contains the python3 version of Pexpect that allows your Pexpect is a pure Python module for spawning child applications; controlling
script to spawn a child application and control it as if a human were typing commands. 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.
%package help
Summary: Development documents and examples for pexpect
Provides: python3-pexpect-doc
%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 %prep
%autosetup -c -p1 %autosetup -n pexpect-4.8.0
mv pexpect-%{version} python2
chmod +x python2/tools/*
chmod a-x python2/examples/*
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}|'
%build %build
cd python2
%py2_build
cd ../python3
%py3_build %py3_build
%install %install
cd python2
%py2_install
rm -rf ${buildroot}%{python2_sitelib}/setuptools/tests
rm -f %{buildroot}%{python2_sitelib}/pexpect/_async.py
cd ../python3
%py3_install %py3_install
rm -rf %{buildroot}%{python3_sitelib}/pexpect/tests 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 .
%if %{with check} %files -n python3-pexpect -f filelist.lst
%check %dir %{python3_sitelib}/*
export PYTHONIOENCODING=UTF-8
export LC_ALL="en_US.UTF-8"
cd python2 %files help -f doclist.lst
%{__python2} ./tools/display-sighandlers.py %{_docdir}/*
%{__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
%changelog %changelog
* Mon Oct 12 2020 wangxiao <wangxiao65@huawei.com> - 4.8.0-1
- upgrade to 4.8.0, add yaml file
* Thu Oct 17 2019 Lijin Yang <yanglijin@huawei.com> - 4.6-2 * Thu Oct 17 2019 Lijin Yang <yanglijin@huawei.com> - 4.6-2
- Package init - Package init

4
python-pexpect.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: pexpect
tag_prefix: ""
seperator: "."