Update to 4.1.0; Improve packaging

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2016-06-30 10:25:00 +02:00
parent c0c6019c9f
commit f85f6111a0
3 changed files with 61 additions and 52 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ pexpect-2.3.tar.gz
/pexpect-3.1.tar.gz /pexpect-3.1.tar.gz
/pexpect-4.0.tar.gz /pexpect-4.0.tar.gz
/pexpect-4.0.1.tar.gz /pexpect-4.0.1.tar.gz
/pexpect-4.1.0.tar.gz

View File

@ -1,19 +1,15 @@
%global modname pexpect %global modname pexpect
Summary: Unicode-aware Pure Python Expect-like module Name: python-%{modname}
Name: python-%{modname} Summary: Unicode-aware Pure Python Expect-like module
Version: 4.0.1 Version: 4.1.0
Release: 6%{?dist} Release: 1%{?dist}
License: MIT
URL: https://github.com/%{modname}/%{modname}
Source0: https://github.com/%{modname}/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz
Patch0: 0001-Stop-asyncio-listening-to-pty-once-we-ve-found-what-.patch License: MIT
Patch1: 0001-disable-max-canon-tests-retain-file-contents.patch URL: https://github.com/%{modname}/%{modname}
Patch2: 0002-2-new-tools-display-fpathconf.maxcanon-.py.patch Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: git-core
%description %description
Pexpect is a pure Python module for spawning child applications; controlling Pexpect is a pure Python module for spawning child applications; controlling
@ -31,13 +27,14 @@ compiled. It should work on any platform that supports the standard Python
pty module. pty module.
%package -n python2-%{modname} %package -n python2-%{modname}
Summary: Unicode-aware Pure Python Expect-like module for Python 2 Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python2-pytest python-ptyprocess
Requires: python-ptyprocess
Provides: pexpect = %{version}-%{release}
Obsoletes: pexpect <= 2.3-20
%{?python_provide:%python_provide python2-%{modname}} %{?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 %description -n python2-pexpect
Pexpect is a pure Python module for spawning child applications; controlling Pexpect is a pure Python module for spawning child applications; controlling
@ -56,13 +53,14 @@ compiled. It should work on any platform that supports the standard Python
pty module. pty module.
%package -n python3-%{modname} %package -n python3-%{modname}
Summary: Unicode-aware Pure Python Expect-like module for Python 3 Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-pytest python3-ptyprocess
Requires: python3-ptyprocess
%{?python_provide:%python_provide python3-%{modname}} %{?python_provide:%python_provide python3-%{modname}}
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-ptyprocess
Requires: python3-ptyprocess
%description -n python3-pexpect %description -n python3-%{modname}
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
@ -79,32 +77,34 @@ compiled. It should work on any platform that supports the standard Python
pty module. pty module.
%prep %prep
%autosetup -n %{modname}-%{version} -S git %autosetup -c
chmod +x ./tools/* mv %{modname}-%{version} python2
#sed -i "s/0.1/10.0/g" tests/test_misc.py chmod +x python2/tools/*
find python2/examples -type f | xargs chmod a-x
cp -pr python2 python3
rm -rf %{py3dir} find python2 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|'
cp -a . %{py3dir} find python3 -type f -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|'
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%build %build
%py2_build pushd python2
%py2_build
popd
pushd %{py3dir} pushd python3
%py3_build %py3_build
popd popd
%install %install
%py2_install pushd python2
rm -rf ${buildroot}%{python2_sitelib}/setuptools/tests %py2_install
# Correct some permissions rm -rf ${buildroot}%{python2_sitelib}/setuptools/tests
find examples -type f -exec chmod a-x \{\} \; # Drop asyncio stuff from py2
rm -f %{buildroot}%{python2_sitelib}/%{modname}/async.py rm -f %{buildroot}%{python2_sitelib}/%{modname}/async.py
popd
pushd %{py3dir} pushd python3
%py3_install %py3_install
# Correct some permissions
find examples -type f -exec chmod a-x \{\} \;
rm -rf %{buildroot}%{python3_sitelib}/pexpect/tests rm -rf %{buildroot}%{python3_sitelib}/pexpect/tests
popd popd
@ -112,29 +112,37 @@ popd
export PYTHONIOENCODING=UTF-8 export PYTHONIOENCODING=UTF-8
export LC_ALL="en_US.UTF-8" export LC_ALL="en_US.UTF-8"
%{__python2} ./tools/display-sighandlers.py pushd python2
%{__python2} ./tools/display-terminalinfo.py %{__python2} ./tools/display-sighandlers.py
PYTHONPATH=`pwd` %{__python2} ./tools/display-maxcanon.py %{__python2} ./tools/display-terminalinfo.py
py.test-2 --verbose PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} ./tools/display-maxcanon.py
py.test-2 --verbose
popd
pushd %{py3dir} pushd python3
%{__python3} ./tools/display-sighandlers.py %{__python3} ./tools/display-sighandlers.py
%{__python3} ./tools/display-terminalinfo.py %{__python3} ./tools/display-terminalinfo.py
PYTHONPATH=`pwd` %{__python3} ./tools/display-maxcanon.py PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} ./tools/display-maxcanon.py
py.test-3 --verbose py.test-3 --verbose
popd popd
%files -n python2-%{modname} %files -n python2-%{modname}
%license LICENSE %license python2/LICENSE
%doc doc examples %doc python2/doc python2/examples
%{python2_sitelib}/%{modname}* %{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-*.egg-info
%files -n python3-%{modname} %files -n python3-%{modname}
%license LICENSE %license python3/LICENSE
%doc doc examples %doc python3/doc python3/examples
%{python3_sitelib}/%{modname}* %{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-*.egg-info
%changelog %changelog
* Thu Jun 30 2016 Igor Gnatenko <ignatenko@redhat.com> - 4.1.0-1
- Update to 4.1.0
- Improve packaging
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-6 * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
2bd260f7f2159f9bcab373721736d526 pexpect-4.0.1.tar.gz 049f3c98f4b0b7426e6b5d8a01566786 pexpect-4.1.0.tar.gz