commit:     f1448b354ef4d5204520103ab87b6334ca8bba51
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 21 12:45:44 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sun Jun 21 14:57:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1448b35

app-vim/vimoutliner: add back Python 3 support.

Closes: https://bugs.gentoo.org/708392
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../vimoutliner-0.4.0_p20180301-r2.ebuild          | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/app-vim/vimoutliner/vimoutliner-0.4.0_p20180301-r2.ebuild 
b/app-vim/vimoutliner/vimoutliner-0.4.0_p20180301-r2.ebuild
index e35b5c0b147..67a530a89de 100644
--- a/app-vim/vimoutliner/vimoutliner-0.4.0_p20180301-r2.ebuild
+++ b/app-vim/vimoutliner/vimoutliner-0.4.0_p20180301-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python{3_6,3_7,3_8} )
 
 inherit python-single-r1 vim-plugin vcs-snapshot
 
@@ -22,16 +22,19 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 VIM_PLUGIN_HELPFILES="vimoutliner"
 VIM_PLUGIN_MESSAGES="filetype"
 
-RDEPEND="${PYTHON_DEPS}
-       $(python_gen_cond_dep '
-               dev-python/autopep8[${PYTHON_MULTI_USEDEP}]
-       ')"
-DEPEND="${RDEPEND}"
+RDEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_cond_dep 'dev-python/autopep8[${PYTHON_MULTI_USEDEP}]')
+"
+
+DEPEND="
+       ${RDEPEND}"
 
 src_prepare() {
        default
 
-       sed -i -e '1s:^:#!/usr/bin/python\n:' 
vimoutliner/scripts/otl2latex/otl2latex.py || die
+       sed -e '1s:^:#!/usr/bin/python\n:' \
+               -i "${S}"/vimoutliner/scripts/otl2latex/otl2latex.py || die
        find "${S}" -type f -exec chmod a+r {} \; || die
 }
 
@@ -39,7 +42,8 @@ src_compile() {
        local pyscript _pyscript
        for pyscript in $(find "${S}" -type f -name \*.py); do
                _pyscript=$(basename "${pyscript}")
-               [ ${_pyscript} == "otl.py" ] && continue
-               python_fix_shebang -q "${pyscript}"
+               [[ ${_pyscript} == "otl.py" ]] && continue
+               2to3 -w -n --no-diffs "${pyscript}" >& /dev/null || die
+               python_fix_shebang -f -q "${pyscript}"
        done
 }

Reply via email to