commit:     b36fcb064c9d30014e4d77bb350f16dd34436cf5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 17 00:52:19 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 17 00:52:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b36fcb06

net-proxy/sshuttle: fix installation with Sphinx 4.0

Sphinx 4.0 has changed the installation layout for man pages.

Closes: https://bugs.gentoo.org/789417
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-proxy/sshuttle/sshuttle-1.0.5.ebuild | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/net-proxy/sshuttle/sshuttle-1.0.5.ebuild 
b/net-proxy/sshuttle/sshuttle-1.0.5.ebuild
index 888000fa91a..5cc44739a20 100644
--- a/net-proxy/sshuttle/sshuttle-1.0.5.ebuild
+++ b/net-proxy/sshuttle/sshuttle-1.0.5.ebuild
@@ -32,10 +32,10 @@ CONFIG_CHECK="~NETFILTER_XT_TARGET_HL 
~IP_NF_TARGET_REDIRECT ~IP_NF_MATCH_TTL ~N
 distutils_enable_tests pytest
 
 python_prepare_all() {
-       # don't run tests via setup.py pytest
+       # Don't run tests via setup.py pytest
        sed -i "/setup_requires=/s/'pytest-runner'//" setup.py || die
 
-       # don't require pytest-cov when running tests
+       # Don't require pytest-cov when running tests
        sed -i "s/^addopts =/#\0/" setup.cfg || die
 
        distutils-r1_python_prepare_all
@@ -47,6 +47,14 @@ python_compile_all() {
 
 python_install_all() {
        HTML_DOCS=( docs/_build/html/. )
-       doman docs/_build/man/*
+
+       # Sphinx 4.0 changed the layout for installed man pages
+       # https://bugs.gentoo.org/789417
+       if has_version '>=dev-python/sphinx-4.0.0' ; then
+               doman docs/_build/man/1/*
+       else
+               doman docs/_build/man/*
+       fi
+
        distutils-r1_python_install_all
 }

Reply via email to