diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-01 00:07:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-01 00:07:06 +0100 |
commit | 1551fe56fd6ba43a94509cffc61b6bf854b7ac9f (patch) | |
tree | be99b6ceb874878a108d68c641b476a2df076517 /dev-python/nodeenv | |
parent | 0e2a727aba684f1a44cc0402a3f77d242140681b (diff) |
gentoo auto-resync : 01:06:2024 - 00:07:06
Diffstat (limited to 'dev-python/nodeenv')
-rw-r--r-- | dev-python/nodeenv/Manifest | 3 | ||||
-rw-r--r-- | dev-python/nodeenv/files/nodeenv-1.9.0-which-hunt.patch | 39 | ||||
-rw-r--r-- | dev-python/nodeenv/nodeenv-1.9.0.ebuild | 34 |
3 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/nodeenv/Manifest b/dev-python/nodeenv/Manifest index ae1ab934eeb4..41dde14b1eb6 100644 --- a/dev-python/nodeenv/Manifest +++ b/dev-python/nodeenv/Manifest @@ -1,4 +1,7 @@ AUX nodeenv-1.8.0-which-hunt.patch 2104 BLAKE2B cf39acc007c270fa742b6e6556c5cd2a1655112852f4d9bb4b446165c511418cc00bc9c8c21be22007d18d0519f213a9e68b8b85d6188d5cebba729cd004c271 SHA512 d1ada89867dde59a136d0f5383e5dcacecf154bd0a264f8bce1f207ae7c08ae4ce61386126f33cf24a8d821ae52dd51b8829cb999c9fe699b7b24c217e5f92bf +AUX nodeenv-1.9.0-which-hunt.patch 1525 BLAKE2B ee26931d73f75bd157224be169ea97381b9d57c704693561347990e2a008c96fe2d051df51c91e4560cd87510626b505b2ebc4b42c001998f7c3f99d2d7890a2 SHA512 8d6c01cf5da9026a12f08bb9eaa92d3838bc0008f917c2323ddfa06caea46b2ede4faae34533a7df0c5b62e4661538df4b74ff63471f33beead42ef51bba1688 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 EBUILD nodeenv-1.8.0-r1.ebuild 655 BLAKE2B 43efd2983f6939e6f96e6375fc611788ad69ced89dc690a1348d43d7656201e70f761f2912e8d8285ecda420f02971d9efa6a420e8af3fc0ef3495799c9059b8 SHA512 f1d9647fa4ef78143dd2803be1ad01ff056b11c87d9774a5583b9234cbe80b4618dccd83340a0ec645f852ff395316a5672261625cff4218c97365a61efd3c27 +EBUILD nodeenv-1.9.0.ebuild 699 BLAKE2B c880dd11732d66ea80d0e818cda7aa92298d0b3485fe197d069e8abec875463829ea985f639b102f6558e0259baaf63e1c231e31758918979870bfb813eac70b SHA512 fc39f4a3dddb5e38d0f0cbfca7d0ddc3a1f0663103e31b518f36e6f492e8192d130caf76015c80b0316960102be3214edb6babea3b3a58b1373740fafaaa5fde MISC metadata.xml 294 BLAKE2B 243e0fe79352f73a8be8b1e9921a4537179e5a251f9b2492854b0609979e221bca122b8ba4afef38b4d6ce556ef59f9dd08f5852e6664488de99015b3790fbcf SHA512 36afd4b95183c7e42bf237887634fb4a19c25ce96cea1282dfc76d38dbef725ffcc02052184a4d4115eeffd276f62f77240809d3cfb0adb6ae5887ade583cb24 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?= <mgorny@gentoo.org> +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 |