commit:     6665137997d6d28883a233ea9a13f7d56e5c7b12
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  2 14:17:06 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Oct  2 14:19:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66651379

dev-python/pexpect: fix PS1, cleanup ebuild

Closes: https://bugs.gentoo.org/629754
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../pexpect/files/pexpect-4.8.0-fix-PS1.patch       | 16 ++++++++++++++++
 ...pect-4.8.0-r1.ebuild => pexpect-4.8.0-r2.ebuild} | 21 ++++-----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch 
b/dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch
new file mode 100644
index 00000000000..903b742f71d
--- /dev/null
+++ b/dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch
@@ -0,0 +1,16 @@
+From: whitley-delamora <62795654+whitley-delam...@users.noreply.github.com>
+Date: Sat, 28 Mar 2020 13:46:47 +0100
+Subject: [PATCH] REPLWrapTestCase.test_bash_env(): export variable PS1
+
+https://github.com/pexpect/pexpect/commit/51c0b09f92f140eda10b62d234710f65ad56dee2
+
+--- a/tests/test_replwrap.py
++++ b/tests/test_replwrap.py
+@@ -45,6 +45,7 @@ def test_bash_env(self):
+         """env, which displays PS1=..., should not mess up finding the prompt.
+         """
+         bash = replwrap.bash()
++        res = bash.run_command("export PS1")
+         res = bash.run_command("env")
+         self.assertIn('PS1', res)
+         res = bash.run_command("echo $HOME")

diff --git a/dev-python/pexpect/pexpect-4.8.0-r1.ebuild 
b/dev-python/pexpect/pexpect-4.8.0-r2.ebuild
similarity index 73%
rename from dev-python/pexpect/pexpect-4.8.0-r1.ebuild
rename to dev-python/pexpect/pexpect-4.8.0-r2.ebuild
index 7baa9ab2af8..9e985d413ab 100644
--- a/dev-python/pexpect/pexpect-4.8.0-r1.ebuild
+++ b/dev-python/pexpect/pexpect-4.8.0-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
 PYTHON_REQ_USE="threads(+)"
 DISTUTILS_USE_SETUPTOOLS=no
 
@@ -16,21 +16,17 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 
sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="doc examples"
+IUSE="examples"
 
 RDEPEND=">=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]"
-DEPEND="
-       doc? ( dev-python/sphinx )"
 
 PATCHES=(
        "${FILESDIR}"/${P}-sphinx-3.patch
+       "${FILESDIR}"/${P}-fix-PS1.patch
 )
 
 distutils_enable_tests pytest
-
-python_compile_all() {
-       use doc && emake -C doc html
-}
+distutils_enable_sphinx doc
 
 src_test() {
        # workaround new readline defaults
@@ -39,16 +35,7 @@ src_test() {
        distutils-r1_src_test
 }
 
-python_install() {
-       distutils-r1_python_install
-       if ! python_is_python3; then
-               # https://bugs.gentoo.org/703100
-               rm "${D}$(python_get_sitedir)/pexpect/_async.py" || die
-       fi
-}
-
 python_install_all() {
-       use doc && local HTML_DOCS=( doc/_build/html/. )
        if use examples; then
                dodoc -r examples
                docompress -x /usr/share/doc/${PF}/examples

Reply via email to