add yaml file and rewrite yaml file

This commit is contained in:
wangxiao65 2020-10-12 10:30:58 +08:00
parent 41986f4696
commit 2bff2bdea2
2 changed files with 83 additions and 75 deletions

View File

@ -1,98 +1,102 @@
%bcond_with check
%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
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
Requires: python3-ptyprocess
%description
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.
%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
BuildRequires: 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.
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
%autosetup -c -p1
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}|'
%autosetup -n pexpect-4.8.0
%build
cd python2
%py2_build
cd ../python3
%py3_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
%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 .
%if %{with check}
%check
export PYTHONIOENCODING=UTF-8
export LC_ALL="en_US.UTF-8"
%files -n python3-pexpect -f filelist.lst
%dir %{python3_sitelib}/*
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
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Oct 17 2019 Lijin Yang <yanglijin@huawei.com> - 4.6-2
* Sat Oct 10 2020 wangxiao <wangxiao65@huawei.com> - 4.8.0-1
- Package init

4
python-pexpect.yaml Normal file
View File

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