Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 046fe46e841e841ae784c42225120e33 > files > 2

python-pexpect-2.5.1-2.mga3.src.rpm

%define module  pexpect
%define name    python-%{module}
%define version 2.5.1
%define release %mkrel 2

Summary:       Unicode-aware Pure Python Expect-like module
Name: 	       %{name}
Version:       %{version}
Release:       %{release}
Source0:       http://pypi.python.org/packages/source/p/pexpect-u/pexpect-u-%{version}.tar.gz
License:       MIT
Group:         Development/Python
Url:           http://pypi.python.org/pypi/pexpect-u
BuildArch:     noarch
BuildRequires: python
BuildRequires: python-devel
BuildRequires: sed
BuildRequires: python-setuptools

%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.

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. 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. The
Pexpect interface was designed to be easy to use.

%package -n python3-pexpect
Summary:	Unicode-aware Pure Python Expect-like module for Python 3
Group:		Development/Python
BuildRequires:	python3
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools

%description -n python3-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.

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. 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. The
Pexpect interface was designed to be easy to use.

%prep
%setup -q -c
mv pexpect-u-%{version} python2
pushd python2
%apply_patches
popd
cp -r python2 python3
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'

%build
pushd python2
python setup.py build
popd

pushd python3
python3 setup.py build
popd

%install
rm -rf %{buildroot}

pushd python2
python setup.py install --skip-build \
    --root $RPM_BUILD_ROOT --install-lib %{python_sitelib}
popd

pushd python3
python3 setup.py install --skip-build \
    --root $RPM_BUILD_ROOT --install-lib %{python3_sitelib}
popd

%files 
%doc python2/README python2/doc python2/examples python2/LICENSE
%{python_sitelib}/*
%exclude %{python_sitelib}/pexpect/tests/

%files -n python3-pexpect
%doc python3/README python3/doc python3/examples python3/LICENSE
%{python3_sitelib}/*
%exclude %{python3_sitelib}/pexpect/tests/





%changelog

* Sun Jan 13 2013 umeabot <umeabot> 2.5.1-2.mga3
+ Revision: 379277
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Dec 02 2012 philippem <philippem> 2.5.1-1.mga3
+ Revision: 325439
- Updated to version 2.5.1 (pexpect-u fork) and added support for Python 3

* Mon Mar 07 2011 spuhler <spuhler> 2.4-3.mga1
+ Revision: 65752
- removed the buildroot line in the spec file
- imported package python-pexpect