summaryrefslogtreecommitdiff
path: root/dev-python/nodeenv
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-13 05:39:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-13 05:39:05 +0000
commit22b4e2ee9c8011b75d7c030d6129a7487494aeba (patch)
treedac0fe56378ac0d61ca4558245fb3702bbf89821 /dev-python/nodeenv
parent05644e4ce4886d97a712fcdca7d4144a7ced4191 (diff)
gentoo auto-resync : 13:12:2023 - 05:39:04
Diffstat (limited to 'dev-python/nodeenv')
-rw-r--r--dev-python/nodeenv/Manifest2
-rw-r--r--dev-python/nodeenv/files/nodeenv-1.8.0-which-hunt.patch64
-rw-r--r--dev-python/nodeenv/nodeenv-1.8.0-r1.ebuild33
3 files changed, 99 insertions, 0 deletions
diff --git a/dev-python/nodeenv/Manifest b/dev-python/nodeenv/Manifest
index 1add1cd18b49..eaaf77e3ddcb 100644
--- a/dev-python/nodeenv/Manifest
+++ b/dev-python/nodeenv/Manifest
@@ -1,3 +1,5 @@
+AUX nodeenv-1.8.0-which-hunt.patch 2104 BLAKE2B cf39acc007c270fa742b6e6556c5cd2a1655112852f4d9bb4b446165c511418cc00bc9c8c21be22007d18d0519f213a9e68b8b85d6188d5cebba729cd004c271 SHA512 d1ada89867dde59a136d0f5383e5dcacecf154bd0a264f8bce1f207ae7c08ae4ce61386126f33cf24a8d821ae52dd51b8829cb999c9fe699b7b24c217e5f92bf
DIST nodeenv-1.8.0.gh.tar.gz 36750 BLAKE2B e75217bb0c468649cbc29688f29d62450008816fb07e4decf1b28dada8b820c2d6f70eb65444e06a8c64b8a816c0cc98f7d179e770eaefe93e87c0cda05e1f85 SHA512 96dce219e00d3837b2b0083af9fe6d94ed4e3cd029e3da564263ad8656dcb9c52440c2df6a6954095e5cacd03e44437f08695603dea82c28122713045183014f
+EBUILD nodeenv-1.8.0-r1.ebuild 658 BLAKE2B 0327727092166c42d500d3f2dbd7b1339c43e13cc07a595487026dd324e1bf4bfe7d8a821f653afe06b358908689b76b87874a0226214a70e524772944c1926b SHA512 62125f5155347adb50744721f494e172024c1a3ea7756ff1a523ff7de6adb13fb28914169fcb5c0cf6d68a88f3d03f7663b78361a4a232582543744b0348e55a
EBUILD nodeenv-1.8.0.ebuild 692 BLAKE2B a1097ac1da6949cbc2775bd4cfd20a7f33b36ac175b07535e2966a3ce02bc4828bff239588fbb5b2bd2bd1b91d212f58e025c094d1ec7a16984511daf3cfdc2b SHA512 9bc7f2619f379734fd07e9b3cd7da3725c63e8ba238367e8bf9adbadd7dab6acf92b5d52d9793f80e55d535b7efcf1461359dd1cc19e291fe3f50d0f1b2e484c
MISC metadata.xml 378 BLAKE2B 7dfad28224587f9df7781a7b1d8837b6c386b40fe20da3fe4b1cd4dcdc417a55ce5da03870907e44f6aa64e1d1160dda43848dac097ef881615688c511ce9a4d SHA512 06d76ecd3a1077b3bd37d37783ff37b4f58ad2e7fbb5294a0594ff748e5f64498567e4d1814a89ed0136ecf17a335a0f8a1627af2185144b4d929b25a8eaa2d3
diff --git a/dev-python/nodeenv/files/nodeenv-1.8.0-which-hunt.patch b/dev-python/nodeenv/files/nodeenv-1.8.0-which-hunt.patch
new file mode 100644
index 000000000000..58d3275e9568
--- /dev/null
+++ b/dev-python/nodeenv/files/nodeenv-1.8.0-which-hunt.patch
@@ -0,0 +1,64 @@
+https://github.com/ekalinin/nodeenv/issues/333
+https://github.com/ekalinin/nodeenv/pull/346
+
+From 0d3ebaf7e13175e2871f59856f29d880a4cb3acf Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 13 Dec 2023 04:13:24 +0000
+Subject: [PATCH] Remove usage of non-portable `which`
+
+* Use Python's shutil.which() instead of shelling out to `which` to find Python 2
+* Use `command -v` instead of `which` in README
+
+Fixes: https://github.com/ekalinin/nodeenv/issues/333
+---
+ README.rst | 2 +-
+ README.ru.rst | 2 +-
+ nodeenv.py | 8 ++------
+ 3 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/README.rst b/README.rst
+index c9e130b..3459572 100644
+--- a/README.rst
++++ b/README.rst
+@@ -211,7 +211,7 @@ environment::
+
+ $ workon my_env
+ $ npm install -g coffee-script
+- $ which coffee
++ $ command -v coffee
+ /home/monty/virtualenvs/my_env/bin/coffee
+
+ Creating a virtual environment with a custom prompt:
+diff --git a/README.ru.rst b/README.ru.rst
+index c3eb130..2cc821e 100644
+--- a/README.ru.rst
++++ b/README.ru.rst
+@@ -155,7 +155,7 @@ python'а::
+
+ $ workon my_env
+ $ npm install -g coffee-script
+- $ which coffee
++ $ command -v coffee
+ /home/monty/virtualenvs/my_env/bin/coffee
+
+
+diff --git a/nodeenv.py b/nodeenv.py
+index 9d5dd06..183ded2 100644
+--- a/nodeenv.py
++++ b/nodeenv.py
+@@ -707,12 +707,8 @@ def build_node_from_src(env_dir, src_dir, node_src_dir, args):
+ # Currently, the node.js build scripts are using python2.*,
+ # therefore we need to temporarily point python exec to the
+ # python 2.* version in this case.
+- try:
+- _, which_python2_output = callit(
+- ['which', 'python2'], args.verbose, True, node_src_dir, env
+- )
+- python2_path = which_python2_output[0]
+- except (OSError, IndexError):
++ python2_path = shutil.which('python2')
++ if not python2_path:
+ raise OSError(
+ 'Python >=3.0 virtualenv detected, but no python2 '
+ 'command (required for building node.js) was found'
+
diff --git a/dev-python/nodeenv/nodeenv-1.8.0-r1.ebuild b/dev-python/nodeenv/nodeenv-1.8.0-r1.ebuild
new file mode 100644
index 000000000000..71ae564e69fb
--- /dev/null
+++ b/dev-python/nodeenv/nodeenv-1.8.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+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=(
+ "${FILESDIR}"/${PN}-1.8.0-which-hunt.patch
+)
+
+distutils_enable_tests pytest