x11-wm/openbox does depend on python-2 at the moment, via PYTHON_TARGETS="python2_7", please allow to use python3_6 via the PYTHON_COMPAT function. pyxdg seems to have python3 available, so all RDEPS should be fine.
Created attachment 597918 [details, diff] Make openbox-xdg-autostart Python 3 compatible USE="xdg" requires a change. I have created the attached and posted upstream: https://github.com/danakj/openbox/pull/35 Signed-off-by: Chris Mayo <aklhfex@gmail.com> But as there haven't been any commits for 4 years I guess it is unlikely to be included there. Hopefully it could still be included in Gentoo because it is a very simple 2to3 conversion of print statements plus "from __future__ import print_function" to support file=sys.stderr in Python 2. For the ebuild itself I did: --- openbox-3.6.1-r1.ebuild +++ openbox-3.6.1-r2.ebuild @@ -3,8 +3,8 @@ EAPI=6 -PYTHON_COMPAT=( python2_7 ) -inherit multilib autotools python-r1 eutils +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) +inherit multilib autotools python-single-r1 eutils DESCRIPTION="A standards compliant, fast, light-weight, extensible window manager" HOMEPAGE="http://openbox.org/" @@ -49,7 +49,10 @@ virtual/pkgconfig x11-base/xorg-proto" -PATCHES=( "${FILESDIR}/${PN}-3.5.2-gnome-session.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-3.5.2-gnome-session.patch" + "${FILESDIR}/${P}-py3-xdg.patch" +) src_prepare() { default @@ -89,7 +92,7 @@ fi use static-libs || prune_libtool_files --all if use xdg ; then - python_replicate_script "${ED}"/usr/libexec/openbox-xdg-autostart + python_fix_shebang "${ED}"/usr/libexec/openbox-xdg-autostart else rm "${ED}"/usr/libexec/openbox-xdg-autostart || die fi
This looks mostly good, though I will also bump the EAPI and will completely remove python 2 support, it's going to be removed soon anyway.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31bad4f781f788ccf848500f8c17905ad32a2de9 commit 31bad4f781f788ccf848500f8c17905ad32a2de9 Author: Hanno Böck <hanno@gentoo.org> AuthorDate: 2020-01-13 16:22:27 +0000 Commit: Hanno Böck <hanno@gentoo.org> CommitDate: 2020-01-13 16:22:27 +0000 x11-wm/openbox: Python 3 support. Use EAPI 7. Remove Python 2, change to python single package. Closes: https://bugs.gentoo.org/696042 Signed-off-by: Hanno Böck <hanno@gentoo.org> Package-Manager: Portage-2.3.84, Repoman-2.3.20 x11-wm/openbox/files/openbox-3.6.1-py3-xdg.patch | 126 +++++++++++++++++++++++ x11-wm/openbox/openbox-3.6.1-r2.ebuild | 100 ++++++++++++++++++ 2 files changed, 226 insertions(+)