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 A2ABF15849D for ; Fri, 31 May 2024 16:18:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A591EE2A8E; Fri, 31 May 2024 16:18:27 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 749D7E2A8E for ; Fri, 31 May 2024 16:18:27 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AABFF33FECD for ; Fri, 31 May 2024 16:18:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E7831BFE for ; Fri, 31 May 2024 16:18:24 +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: <1717172301.a328244265b4585173c33b4147e9650028c70357.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/nodeenv/files/, dev-python/nodeenv/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/nodeenv/Manifest dev-python/nodeenv/files/nodeenv-1.9.0-which-hunt.patch dev-python/nodeenv/nodeenv-1.9.0.ebuild X-VCS-Directories: dev-python/nodeenv/files/ dev-python/nodeenv/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a328244265b4585173c33b4147e9650028c70357 X-VCS-Branch: master Date: Fri, 31 May 2024 16:18:24 +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: b6efd532-26aa-40bb-81e3-3cb5cb0a9628 X-Archives-Hash: 34f7544c2f04077c42b23c774fd83118 commit: a328244265b4585173c33b4147e9650028c70357 Author: Michał Górny gentoo org> AuthorDate: Fri May 31 16:15:24 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri May 31 16:18:21 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3282442 dev-python/nodeenv: Bump to 1.9.0 Signed-off-by: Michał Górny gentoo.org> dev-python/nodeenv/Manifest | 1 + .../nodeenv/files/nodeenv-1.9.0-which-hunt.patch | 39 ++++++++++++++++++++++ dev-python/nodeenv/nodeenv-1.9.0.ebuild | 34 +++++++++++++++++++ 3 files changed, 74 insertions(+) diff --git a/dev-python/nodeenv/Manifest b/dev-python/nodeenv/Manifest index f10fe25c830c..967102f541df 100644 --- a/dev-python/nodeenv/Manifest +++ b/dev-python/nodeenv/Manifest @@ -1 +1,2 @@ DIST nodeenv-1.8.0.gh.tar.gz 36750 BLAKE2B e75217bb0c468649cbc29688f29d62450008816fb07e4decf1b28dada8b820c2d6f70eb65444e06a8c64b8a816c0cc98f7d179e770eaefe93e87c0cda05e1f85 SHA512 96dce219e00d3837b2b0083af9fe6d94ed4e3cd029e3da564263ad8656dcb9c52440c2df6a6954095e5cacd03e44437f08695603dea82c28122713045183014f +DIST nodeenv-1.9.0.gh.tar.gz 37002 BLAKE2B a8db26f893816c30c8ff5e86d98b23106b1a3b74dd5f58dd51f423836b070851a5b761fca5221b9b8510a427cae2e36732841ad9fea0a9728aae8d303ca5f40d SHA512 d24612372f7fb6d909ce164f6b980086581b53ee8234c6ec14003a79418d7798481275e87589ade47c0502a4b396fa7b07fcfbb99174f1331f65dd6e7a1e0fd7 diff --git a/dev-python/nodeenv/files/nodeenv-1.9.0-which-hunt.patch b/dev-python/nodeenv/files/nodeenv-1.9.0-which-hunt.patch new file mode 100644 index 000000000000..3da27677bc07 --- /dev/null +++ b/dev-python/nodeenv/files/nodeenv-1.9.0-which-hunt.patch @@ -0,0 +1,39 @@ +From e3572d266d9b42affc1335e092e461709b29cdea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Fri, 31 May 2024 17:59:30 +0200 +Subject: [PATCH] Replace additional use of `which(1)` with `shutil.which()` + +Replace the remaining use of external `which(1)` tool with +`shutil.which()` from the standard Python library, finally removing +the dependency on a third party package. + +This is a followup to 1024f4f64ceabd612b4df9a0b9dbe2691b2f5f9d. +--- + nodeenv.py | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/nodeenv.py b/nodeenv.py +index bbc19fb..a41cd5d 100644 +--- a/nodeenv.py ++++ b/nodeenv.py +@@ -930,14 +930,10 @@ def install_activate(env_dir, args): + prompt = args.prompt or '(%s)' % os.path.basename(os.path.abspath(env_dir)) + + if args.node == "system": +- env = os.environ.copy() +- env.update({'PATH': remove_env_bin_from_path(env['PATH'], bin_dir)}) ++ path_var = remove_env_bin_from_path(os.environ['PATH'], bin_dir) + for candidate in ("nodejs", "node"): +- which_node_output, _ = subprocess.Popen( +- ["which", candidate], +- stdout=subprocess.PIPE, env=env).communicate() +- shim_node = clear_output(which_node_output) +- if shim_node: ++ shim_node = shutil.which(candidate, path=path_var) ++ if shim_node is not None: + break + assert shim_node, "Did not find nodejs or node system executable" + +-- +2.45.1 + diff --git a/dev-python/nodeenv/nodeenv-1.9.0.ebuild b/dev-python/nodeenv/nodeenv-1.9.0.ebuild new file mode 100644 index 000000000000..cf2379ca6bc3 --- /dev/null +++ b/dev-python/nodeenv/nodeenv-1.9.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +inherit distutils-r1 + +DESCRIPTION="Node.js virtual environment builder" +HOMEPAGE=" + https://github.com/ekalinin/nodeenv/ + https://pypi.org/project/nodeenv/ +" +SRC_URI=" + https://github.com/ekalinin/nodeenv/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~x86" + +# requires network access +RESTRICT="test" +PROPERTIES="test_network" + +PATCHES=( + # https://github.com/ekalinin/nodeenv/pull/355 + "${FILESDIR}/${P}-which-hunt.patch" +) + +distutils_enable_tests pytest