From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 13F57158086 for ; Wed, 8 Dec 2021 22:40:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52D1D2BC017; Wed, 8 Dec 2021 22:40:34 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B7CA42BC017 for ; Wed, 8 Dec 2021 22:40:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2FCA6343648 for ; Wed, 8 Dec 2021 22:40:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F33C29 for ; Wed, 8 Dec 2021 22:40:30 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1639003172.2f4ec8fd66f1889c59061c93c970ac45157f5f7c.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: plugin/ X-VCS-Repository: proj/gentoo-syntax X-VCS-Files: plugin/gentoo-common.vim X-VCS-Directories: plugin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 2f4ec8fd66f1889c59061c93c970ac45157f5f7c X-VCS-Branch: master Date: Wed, 8 Dec 2021 22:40:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6667f090-4964-46e3-ac60-72218fdfc646 X-Archives-Hash: 2dd389c9adf2675f72aa979b6d7036d1 commit: 2f4ec8fd66f1889c59061c93c970ac45157f5f7c Author: Michał Górny gentoo org> AuthorDate: Wed Dec 8 22:39:32 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Dec 8 22:39:32 2021 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=2f4ec8fd gentoo-common: Call python instead of eselect-python Call python (through python-exec) in order to determine the preferred value for PYTHON_COMPAT rather than using the obsolete eselect-python tool. Closes: https://github.com/gentoo/gentoo-syntax/issues/35 Signed-off-by: Michał Górny gentoo.org> plugin/gentoo-common.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim index 1c9f4ed..42b2451 100644 --- a/plugin/gentoo-common.vim +++ b/plugin/gentoo-common.vim @@ -56,13 +56,9 @@ fun! GentooGetPythonTargets() if exists("g:gentoopythontargets") && g:gentoopythontargets != "" return g:gentoopythontargets else - let l:py3 = system("eselect python show --python3") + let l:py3 = system("python -c 'import epython; print(epython.EPYTHON)'") let l:py3 = substitute(l:py3, "\n", "", "g") - if l:py3 == "" - let l:py3 = "python3.8" - endif - let l:pythons = substitute(l:py3, "[.]", "_", "g") let g:gentoopythontargets = l:pythons