Skip to content

Commit

Permalink
app-vim/vimoutliner: add back Python 3 support.
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/708392
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrice Clement <[email protected]>
  • Loading branch information
monsieurp committed Jun 21, 2020
1 parent 4a69c26 commit f1448b3
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions app-vim/vimoutliner/vimoutliner-0.4.0_p20180301-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -22,24 +22,28 @@ 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
}

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
}

0 comments on commit f1448b3

Please sign in to comment.