summaryrefslogtreecommitdiff
path: root/dev-python/virtualenvwrapper
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-21 13:19:15 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-21 13:19:15 +0100
commitb02a2ac044a27eeef2c52b57308a8591b07448fa (patch)
tree7400c59c9e5d0f3d0d502a7eff9e3e0d4ccc166d /dev-python/virtualenvwrapper
parente4cd098fab4f141df4d2fd24dfdc9b5f223c694b (diff)
gentoo auto-resync : 21:06:2023 - 13:19:15
Diffstat (limited to 'dev-python/virtualenvwrapper')
-rw-r--r--dev-python/virtualenvwrapper/Manifest5
-rw-r--r--dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-remove-use-of-which.patch116
-rw-r--r--dev-python/virtualenvwrapper/metadata.xml9
-rw-r--r--dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121.ebuild74
4 files changed, 203 insertions, 1 deletions
diff --git a/dev-python/virtualenvwrapper/Manifest b/dev-python/virtualenvwrapper/Manifest
index 575708f1b565..2ceedca57d59 100644
--- a/dev-python/virtualenvwrapper/Manifest
+++ b/dev-python/virtualenvwrapper/Manifest
@@ -1,3 +1,6 @@
+AUX virtualenvwrapper-4.8.4_p20230121-remove-use-of-which.patch 4608 BLAKE2B 06a808faa7c3fbb96206c59d6c40429800496be41e8b03bf760a199bbb50b1735469094e6cb35504c23a7339d5564329e335b7a563b1df96143e9cf48b9cde43 SHA512 52ed979503f50d53dc849f99f219200e3ec837693612a8723dd7f0cb8bd325573c9bbbefbd162da1390eae9e4e0031079ac9d151cff2232c43fa4aa892bf81f6
DIST virtualenvwrapper-4.8.4.tar.gz 334920 BLAKE2B cd790b1e98cca7d09ea9c80df5d52380335d4a0ea4e6d95f7bd48d78583e0d842e1145ea08d8d8c73516adbe8d6c75bd53c17943723f859860a0cad105a2b058 SHA512 461938100061e11af0ee9b17405d991ae34e5ec9c79cc12614962d3178b588a2da710baa15ac626960b09177c1b5b10c7bc590cb4c126ebd2f719d0f1527c9c4
+DIST virtualenvwrapper-4.8.4_p20230121.gh.tar.gz 72852 BLAKE2B 2996b88f93790587ffbeed936334bb1f12a9d6d952eb7c9b728a6644c9b7c7e0953bc7c71201fbd590f6258eb163af1aa6494f476decfa54f095ca215e4e13e1 SHA512 9df8b20dd8d50fe7891b845c8112edc165b08cc231ebb4010aed8ec50a22005207a9a3c9c9941daa2b958022f0edf993425bf95692f7032d1e5c5719a552d3b4
EBUILD virtualenvwrapper-4.8.4-r2.ebuild 1119 BLAKE2B d39f18ee010076da6c38b0a90be3607be1fec03282d9e9d2c56a47f27ff147364e97cd37229ef6cfe5fff85971c5bb6cc086317ef1dee3bba76872c63785a70a SHA512 169729c101a2cae2770eb5b17391f6a37ae3069494693579b9a660cfddbe8c944357a37876746894d563444671f3367810da24a76d0c45a9f77abdef1809feaa
-MISC metadata.xml 391 BLAKE2B a8df48eb78d09f7926b81deb1b7670aa7f72ad7f94bee5e40a9308520c4320f6f0e152701da8cc329e7d01d056e217c2b59fad79154aa1db126ad736acb62d22 SHA512 1c82a0a04bb000fd1952c9ed86d07721618b95cc0d4accd95fa5c8a5c5fcbe4c3162c241a087d678289c4d0b12d48cde840262395edca874a0417e76deefaabb
+EBUILD virtualenvwrapper-4.8.4_p20230121.ebuild 1850 BLAKE2B d86513e6abf367b1532bcf3a8046459b330470ae5f76f540cf9f0c1ca5a2751fd7c4d701eef5afb95ba353df7ec0b49da1e2a31882b1cdaec7b3b79dddd36611 SHA512 2594aed571e36326d72206e1432bf02303114b2948fcc95024889bcdb578105c5467583583ef8ba74d261aa68c3ad382d8abc20175f5dc29e861d94db75c4704
+MISC metadata.xml 732 BLAKE2B fa857378ea2001e084a9d00d5ccc65644cc4e3ade62c04ff7dfeec4cf7df245bd700833aec1f5f430d780be5adb8fb594300e43a113b232fa83a3cfd2fa0cb15 SHA512 935796e3055e0104328dab877ca92e579770d6748053e464f6ce3563ea49022eaeae322c5c9cb026e9c3f42089c89ae06c0a2e755d124c71e05768cbbefdda44
diff --git a/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-remove-use-of-which.patch b/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-remove-use-of-which.patch
new file mode 100644
index 000000000000..875542cf17f6
--- /dev/null
+++ b/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-remove-use-of-which.patch
@@ -0,0 +1,116 @@
+https://bugs.gentoo.org/646588
+https://github.com/parona-source/virtualenvwrapper/commit/d7dd99ca8e4ebdf5668708634cf793acee5d35b3
+
+From d7dd99ca8e4ebdf5668708634cf793acee5d35b3 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Wed, 21 Jun 2023 11:35:04 +0300
+Subject: [PATCH] Remove use of which, use command -v or built-ins instead
+
+* which isn't a POSIX tool and some distributions have or are still
+ considering dropping it in favour of using commands included by
+ POSIX or shell built-ins.
+* Used command built-in where applicable, but type and whence for bash
+ and zsh respectively in virtualenvwrapper_verify_resource to preserve
+ previous behaviour with which when programs also have built-ins
+ with the same name. command -v outputs just the name and not the path
+ in those cases.
+
+https://lwn.net/Articles/874049/
+https://bugs.gentoo.org/646588
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+---
+ tests/run_tests | 2 +-
+ tests/test_cp.sh | 2 +-
+ tests/test_mkvirtualenv.sh | 4 +---
+ virtualenvwrapper.sh | 10 ++++++++--
+ virtualenvwrapper_lazy.sh | 2 +-
+ 5 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/tests/run_tests b/tests/run_tests
+index 68cb362..c9a81d6 100755
+--- a/tests/run_tests
++++ b/tests/run_tests
+@@ -62,7 +62,7 @@ do
+ echo " BASH_VERSION=$BASH_VERSION"
+ echo " ZSH_VERSION=$ZSH_VERSION"
+ echo " KSH_VERSION=$KSH_VERSION"
+- echo " virtualenv=$(which virtualenv)"
++ echo " virtualenv=$(command -v virtualenv)"
+ echo " test_shell_opts=$test_shell_opts"
+ echo " ZSH=$ZSH_NAME $ZSH_EVAL_CONTEXT"
+ echo " TMPDIR=$TMPDIR"
+diff --git a/tests/test_cp.sh b/tests/test_cp.sh
+index 3bd9196..3227c7a 100755
+--- a/tests/test_cp.sh
++++ b/tests/test_cp.sh
+@@ -26,7 +26,7 @@ test_new_env_activated () {
+ (cd tests/testpackage && python setup.py install) >/dev/null 2>&1
+ cpvirtualenv "source" "destination" >/dev/null 2>&1
+ rmvirtualenv "source" >/dev/null 2>&1
+- testscript="$(which testscript.py)"
++ testscript="$(command -v testscript.py)"
+ assertTrue "Environment test script not found in path" "[ $WORKON_HOME/destination/bin/testscript.py -ef $testscript ]"
+ testscriptcontent="$(cat $testscript)"
+ assertTrue "No cpvirtualenvtest in $testscriptcontent" "echo $testscriptcontent | grep cpvirtualenvtest"
+diff --git a/tests/test_mkvirtualenv.sh b/tests/test_mkvirtualenv.sh
+index 3c37dfe..47b603a 100755
+--- a/tests/test_mkvirtualenv.sh
++++ b/tests/test_mkvirtualenv.sh
+@@ -68,11 +68,9 @@ GLOBAL postmkvirtualenv"
+ }
+
+ test_no_virtualenv () {
+- # Find "which" before we change the path
+- which=$(which which)
+ old_path="$PATH"
+ PATH="/bin:/usr/sbin:/sbin"
+- venv=$($which virtualenv 2>/dev/null)
++ venv=$(command -v virtualenv)
+ if [ ! -z "$venv" ]
+ then
+ echo "FOUND \"$venv\" in PATH so skipping this test"
+diff --git a/virtualenvwrapper.sh b/virtualenvwrapper.sh
+index b8e4a42..469fa35 100644
+--- a/virtualenvwrapper.sh
++++ b/virtualenvwrapper.sh
+@@ -47,7 +47,7 @@
+ # Locate the global Python where virtualenvwrapper is installed.
+ if [ "${VIRTUALENVWRAPPER_PYTHON:-}" = "" ]
+ then
+- _virtualenvwrapper_python_executable="$(which python3 2>/dev/null)"
++ _virtualenvwrapper_python_executable="$(command -v python3)"
+ if [ -n "$_virtualenvwrapper_python_executable" ] && $_virtualenvwrapper_python_executable -m 'virtualenvwrapper.hook_loader' --help >/dev/null 2>&1
+ then
+ VIRTUALENVWRAPPER_PYTHON=$_virtualenvwrapper_python_executable
+@@ -330,7 +330,13 @@ function virtualenvwrapper_initialize {
+
+ # Verify that the passed resource is in path and exists
+ function virtualenvwrapper_verify_resource {
+- typeset exe_path="$(command \which "$1" | (unset GREP_OPTIONS; command \grep -v "not found"))"
++ if [ -n "${ZSH_VERSION}" ]
++ then
++ typeset exe_path="$(whence -p "${1}")"
++ else
++ typeset exe_path="$(type -P "${1}")"
++ fi
++
+ if [ "$exe_path" = "" ]
+ then
+ echo "ERROR: virtualenvwrapper could not find $1 in your path" >&2
+diff --git a/virtualenvwrapper_lazy.sh b/virtualenvwrapper_lazy.sh
+index 3902d08..9016b6c 100644
+--- a/virtualenvwrapper_lazy.sh
++++ b/virtualenvwrapper_lazy.sh
+@@ -5,7 +5,7 @@ export _VIRTUALENVWRAPPER_API="$_VIRTUALENVWRAPPER_API mkvirtualenv rmvirtualenv
+
+ if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
+ then
+- export VIRTUALENVWRAPPER_SCRIPT="$(command \which virtualenvwrapper.sh)"
++ export VIRTUALENVWRAPPER_SCRIPT="$(command -v virtualenvwrapper.sh)"
+ fi
+ if [ -z "$VIRTUALENVWRAPPER_SCRIPT" ]
+ then
+--
+2.41.0
+
diff --git a/dev-python/virtualenvwrapper/metadata.xml b/dev-python/virtualenvwrapper/metadata.xml
index 593e63c5b039..8b706320125a 100644
--- a/dev-python/virtualenvwrapper/metadata.xml
+++ b/dev-python/virtualenvwrapper/metadata.xml
@@ -1,12 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>parona@protonmail.com</email>
+ <name>Alfred Wingate</name>
+ </maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="pypi">virtualenvwrapper</remote-id>
<remote-id type="bitbucket">dhellmann/virtualenvwrapper</remote-id>
+ <remote-id type="github">python-virtualenvwrapper/virtualenvwrapper</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121.ebuild b/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121.ebuild
new file mode 100644
index 000000000000..106b7a037d89
--- /dev/null
+++ b/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="Set of extensions to Ian Bicking's virtualenv tool"
+HOMEPAGE="
+ https://github.com/python-virtualenvwrapper/virtualenvwrapper
+ https://pypi.org/project/virtualenvwrapper/
+"
+
+COMMIT="e63d2c389ed276aa161bb50a27c77af94d96a50c"
+SRC_URI="
+ https://github.com/python-virtualenvwrapper/virtualenvwrapper/archive/${COMMIT}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+export PBR_VERSION="${PV/_p/.post}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ dev-python/stevedore[${PYTHON_USEDEP}]
+ dev-python/virtualenv-clone[${PYTHON_USEDEP}]
+ ')
+"
+BDEPEND="
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ dev-python/pbr[${PYTHON_USEDEP}]
+ ')
+"
+
+PATCHES=(
+ "${FILESDIR}/virtualenvwrapper-${PV}-remove-use-of-which.patch"
+)
+
+src_prepare() {
+ default
+
+ # specify default python interpeter to align with PYTHON_SINGLE_TARGET
+ sed -i -e \
+ "s|\(_virtualenvwrapper_python_executable=\"\)\$(.*)\(\"\)|\1${EPYTHON}\2|" \
+ virtualenvwrapper.sh || die
+
+ # remove tests which require an internet connection
+ rm tests/test_mkvirtualenv_install.sh || die
+ rm tests/test_mkvirtualenv_requirements.sh || die
+
+ # remove tests which require functional git repos with remotes
+ sed -i -e '/test_wipeenv_\(pip_e\|develop\) () {/,/}/ d' tests/test_wipeenv.sh || die
+}
+
+python_test() {
+ # tests have unusual expectations
+ local -x HOME="${HOME%/}"
+ local -x USER="${USER}"
+
+ cp -a "${BUILD_DIR}"/{install/usr,test} || die
+ local -x VIRTUAL_ENV="${BUILD_DIR}/test"
+
+ bash ./tests/run_tests "${VIRTUAL_ENV}" || die "Tests failed under ${EPYTHON}"
+}