[packages/python3-pexpect] - python-pexpect.spec updated to 4.9.0 for python 3.?+
qboosh
qboosh at pld-linux.org
Sat Jun 28 08:03:44 CEST 2025
commit dd6b668e73034bda2172f548d5e1acac62dddfef
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jun 28 08:05:06 2025 +0200
- python-pexpect.spec updated to 4.9.0 for python 3.?+
...etuptools.patch => pexpect-use_setuptools.patch | 0
python-pexpect.spec => python3-pexpect.spec | 96 +++-------------------
sphinx-api.patch | 11 ---
3 files changed, 13 insertions(+), 94 deletions(-)
---
diff --git a/python-pexpect.spec b/python3-pexpect.spec
similarity index 54%
rename from python-pexpect.spec
rename to python3-pexpect.spec
index 7b36cd6..696e641 100644
--- a/python-pexpect.spec
+++ b/python3-pexpect.spec
@@ -1,50 +1,37 @@
#
# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
%bcond_with tests # py.test tests [require ptys, so not on builders]
%bcond_without doc # Sphinx documentation
%define module pexpect
Summary: Pure Python Expect-like module
Summary(pl.UTF-8): Moduł podobny do narzędzia Expect napisany w czystym Pythonie
-Name: python-%{module}
-Version: 4.8.0
-Release: 9
+Name: python3-%{module}
+Version: 4.9.0
+Release: 1
License: ISC
Group: Development/Languages/Python
#Source0Download: https://pypi.org/simple/pexpect/
Source0: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
-# Source0-md5: 153eb25184249d6a85fde9acf4804085
-Patch0: %{name}-use_setuptools.patch
-Patch1: sphinx-api.patch
-URL: http://pexpect.readthedocs.io/
+# Source0-md5: f48d48325ee7f1221add0396ea9e2f14
+Patch0: pexpect-use_setuptools.patch
+URL: https://pexpect.readthedocs.io/
%if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
BuildRequires: glibc-localedb-all
%endif
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.7
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-ptyprocess >= 0.5
-BuildRequires: python-pytest
-%endif
-%endif
-%if %{with python3}
BuildRequires: python3-modules >= 1:3.2
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-ptyprocess >= 0.5
BuildRequires: python3-pytest
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
-BuildRequires: sphinx-pdg
+BuildRequires: python3-sphinxcontrib_github_alt
+BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.7
+Requires: python3-modules >= 1:3.2
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -62,26 +49,6 @@ znalezione wzorce na ich wyjściu. Pexpect działa podobnie do Expecta
Dona Libesa - pozwala skryptom z ich poziomu uruchomić inne programy i
sprawować nad nimi kontrolę imitując interakcję użytkownika.
-%package -n python3-%{module}
-Summary: Pure Python Expect-like module
-Summary(pl.UTF-8): Moduł podobny do narzędzia Expect napisany w czystym Pythonie
-Group: Development/Languages/Python
-Requires: python3-modules >= 1:3.2
-
-%description -n python3-%{module}
-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.
-
-%description -n python3-%{module} -l pl.UTF-8
-Pexpect jest modułem napisanym wyłącznie w Pythonie przeznaczonym do
-uruchamiania aplikacji i kontroli nad nimi poprzez reagowanie na
-znalezione wzorce na ich wyjściu. Pexpect działa podobnie do Expecta
-Dona Libesa - pozwala skryptom z ich poziomu uruchomić inne programy i
-sprawować nad nimi kontrolę imitując interakcję użytkownika.
-
%package apidocs
Summary: Documentation for Python pexpect module
Summary(pl.UTF-8): Dokumentacja do modułu Pythona pexpect
@@ -96,29 +63,19 @@ Dokumentacja do modułu Pythona pexpect.
%prep
%setup -q -n %{module}-%{version}
%patch -P 0 -p1
-%patch -P 1 -p1
# fix invalid mapping
sed -i -e "s#^intersphinx_mapping =.*#intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}#g" doc/conf.py
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-# FSM test fails with python 2 because of redirected output(?)
-LC_ALL=C.UTF-8 \
-%{__python} -m pytest -k 'not test_run_fsm' tests
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
+# test_socket.py tests use network
+# some test_replwrap.py tests have some expectation on bash PS1
LC_ALL=C.UTF-8 \
-%{__python3} -m pytest tests
-%endif
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests -k 'not test_socket and not test_existing_spawn and not test_no_change_prompt and not test_pager_as_cat and not test_python'
%endif
%if %{with doc}
@@ -128,21 +85,6 @@ LC_ALL=C.UTF-8 \
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/pexpect/bashrc.sh
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.py
-%{__sed} -i -e '1s,/usr/bin/python,%{__python},' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/cgishell.cgi
-%{__sed} -i -e '2s,/usr/bin/env python,,' $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/cgishell.cgi
-%endif
-
-%if %{with python3}
%py3_install
%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/pexpect/bashrc.sh
@@ -152,28 +94,16 @@ cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
%{__sed} -i -e '1s,/usr/bin/env python,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
%{__sed} -i -e '1s,/usr/bin/python,%{__python3},' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/cgishell.cgi
%{__sed} -i -e '2s,/usr/bin/env python,,' $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/cgishell.cgi
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc LICENSE README.rst
-%{py_sitescriptdir}/pexpect
-%{py_sitescriptdir}/pexpect-%{version}-py*.egg-info
-%{_examplesdir}/%{name}-%{version}
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
%{py3_sitescriptdir}/pexpect
%{py3_sitescriptdir}/pexpect-%{version}-py*.egg-info
%{_examplesdir}/python3-%{module}-%{version}
-%endif
%if %{with doc}
%files apidocs
diff --git a/python-pexpect-use_setuptools.patch b/pexpect-use_setuptools.patch
similarity index 100%
rename from python-pexpect-use_setuptools.patch
rename to pexpect-use_setuptools.patch
diff --git a/sphinx-api.patch b/sphinx-api.patch
deleted file mode 100644
index 4d8e2f2..0000000
--- a/sphinx-api.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- pexpect-4.8.0/doc/sphinxext/github.py~ 2020-01-17 18:08:15.000000000 +0100
-+++ pexpect-4.8.0/doc/sphinxext/github.py 2021-03-02 22:17:28.102562167 +0100
-@@ -146,7 +146,7 @@
-
- :param app: Sphinx application context.
- """
-- app.info('Initializing GitHub plugin')
-+ #app.info('Initializing GitHub plugin')
- app.add_role('ghissue', ghissue_role)
- app.add_role('ghpull', ghissue_role)
- app.add_role('ghuser', ghuser_role)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pexpect.git/commitdiff/dd6b668e73034bda2172f548d5e1acac62dddfef
More information about the pld-cvs-commit
mailing list