* [gentoo-commits] repo/gentoo:master commit in: dev-python/virtualenvwrapper/, dev-python/virtualenvwrapper/files/
@ 2023-07-24 1:44 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-07-24 1:44 UTC (permalink / raw
To: gentoo-commits
commit: bd3945affbf081af5998a50b5d0a7119b117be4f
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Jul 23 01:04:10 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 24 01:44:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd3945af
dev-python/virtualenvwrapper: fix broken sed expression
* Previous change 0c64ab0 had a mistake get through and change wasnt
applied. Lesson learned about double and triple checking regex...
* Instead patch with @@GENTOO_PYTHON_EXECUTABLE@@ and then sed replace
with current python interpeter.
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32007
Signed-off-by: Sam James <sam <AT> gentoo.org>
...0230121-override-default-python-executable.patch | 21 +++++++++++++++++++++
... => virtualenvwrapper-4.8.4_p20230121-r2.ebuild} | 5 ++---
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-override-default-python-executable.patch b/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-override-default-python-executable.patch
new file mode 100644
index 000000000000..0c7268422efe
--- /dev/null
+++ b/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-override-default-python-executable.patch
@@ -0,0 +1,21 @@
+https://github.com/parona-source/virtualenvwrapper/commit/9cb7bcab244c3e49d7b25b73e82566d0adce3282
+
+From 9cb7bcab244c3e49d7b25b73e82566d0adce3282 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sun, 23 Jul 2023 05:05:59 +0300
+Subject: [PATCH] virtualenvwrapper.sh: Override default python executable
+
+--- 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="$(command -v python3)"
++ _virtualenvwrapper_python_executable="@@GENTOO_PYTHON_EXECUTABLE@@"
+ if [ -n "$_virtualenvwrapper_python_executable" ] && $_virtualenvwrapper_python_executable -m 'virtualenvwrapper.hook_loader' --help >/dev/null 2>&1
+ then
+ VIRTUALENVWRAPPER_PYTHON=$_virtualenvwrapper_python_executable
+--
+2.41.0
+
diff --git a/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121-r1.ebuild b/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121-r2.ebuild
similarity index 91%
rename from dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121-r1.ebuild
rename to dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121-r2.ebuild
index 080fc0b55799..be2e15f03d8b 100644
--- a/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121-r1.ebuild
+++ b/dev-python/virtualenvwrapper/virtualenvwrapper-4.8.4_p20230121-r2.ebuild
@@ -44,15 +44,14 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/virtualenvwrapper-${PV}-remove-use-of-which.patch"
+ "${FILESDIR}/virtualenvwrapper-${PV}-override-default-python-executable.patch"
)
src_prepare() {
default
# specify default python interpeter to align with PYTHON_SINGLE_TARGET
- sed -i -e \
- "s|\(_virtualenvwrapper_python_executable=\"\$(\).\w\((\"\)|\1command -v ${EPYTHON}\2|" \
- virtualenvwrapper.sh || die
+ sed -i -e "s:@@GENTOO_PYTHON_EXECUTABLE@@:${PYTHON}:" virtualenvwrapper.sh || die
# remove tests which require an internet connection
rm tests/test_mkvirtualenv_install.sh || die
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/virtualenvwrapper/, dev-python/virtualenvwrapper/files/
@ 2024-02-15 10:42 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-02-15 10:42 UTC (permalink / raw
To: gentoo-commits
commit: d3e5b29268fc2bf13f2b6d320576451df6f66d7c
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 15 10:32:20 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 15 10:32:20 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3e5b292
dev-python/virtualenvwrapper: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/virtualenvwrapper/Manifest | 1 -
...apper-4.8.4_p20230121-remove-use-of-which.patch | 116 ---------------------
.../virtualenvwrapper-6.0.0.ebuild | 71 -------------
3 files changed, 188 deletions(-)
diff --git a/dev-python/virtualenvwrapper/Manifest b/dev-python/virtualenvwrapper/Manifest
index 4b172b0ff2f6..38deaed880b4 100644
--- a/dev-python/virtualenvwrapper/Manifest
+++ b/dev-python/virtualenvwrapper/Manifest
@@ -1,2 +1 @@
-DIST virtualenvwrapper-6.0.0.tar.gz 95407 BLAKE2B b2a6a7a58be23e1cf0642d780d8fc53e9aef6e44703fa15a2e7627db3c3e12024b33da75b591897ea5181ed5407eb2d52e96f56d7026c083a03e13f94165d9e4 SHA512 ab805b61a9f81e0b0842182686a88fcf07e41ad7206484f002110c693ca6076e2a88fefbef8b7409838082ed7e7a43f61f1a0006a314cb1d71efb943dc6fdede
DIST virtualenvwrapper-6.1.0.tar.gz 95880 BLAKE2B 86d37682148ee132f9be5c4554de3c770c0f1c3055441bbce080d94da6fa83fc138a15c4c7edbb525e0c303c3c2ba5c1b1ee23260ea5bafaab157b3699b39b87 SHA512 78e09956132862fbf1caf53cb6c9375aa3718685f72d8f3fb61e402e6b26e8568d5b3a3ed18142b14f3b2691f89e6f912782e813d8139dc71ceb7e47bde8d0b0
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
deleted file mode 100644
index 875542cf17f6..000000000000
--- a/dev-python/virtualenvwrapper/files/virtualenvwrapper-4.8.4_p20230121-remove-use-of-which.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-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/virtualenvwrapper-6.0.0.ebuild b/dev-python/virtualenvwrapper/virtualenvwrapper-6.0.0.ebuild
deleted file mode 100644
index 45e014b5fb7f..000000000000
--- a/dev-python/virtualenvwrapper/virtualenvwrapper-6.0.0.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2024 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_{11..12} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Set of extensions to Ian Bicking's virtualenv tool"
-HOMEPAGE="
- https://github.com/python-virtualenvwrapper/virtualenvwrapper/
- https://pypi.org/project/virtualenvwrapper/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~ppc64 x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- $(python_gen_cond_dep '
- dev-python/stevedore[${PYTHON_USEDEP}]
- dev-python/virtualenv[${PYTHON_USEDEP}]
- dev-python/virtualenv-clone[${PYTHON_USEDEP}]
- ')
-"
-BDEPEND="
- $(python_gen_cond_dep '
- dev-python/setuptools-scm[${PYTHON_USEDEP}]
- ')
- test? (
- ${RDEPEND}
- $(python_gen_cond_dep '
- dev-python/pip[${PYTHON_USEDEP}]
- ')
- )
-"
-
-PATCHES=(
- "${FILESDIR}/virtualenvwrapper-6.0.0-remove-use-of-which.patch"
- "${FILESDIR}/virtualenvwrapper-4.8.4_p20230121-override-default-python-executable.patch"
-)
-
-src_prepare() {
- default
-
- # specify default python interpeter to align with PYTHON_SINGLE_TARGET
- sed -i -e "s:@@GENTOO_PYTHON_EXECUTABLE@@:${PYTHON}:" 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}"
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-15 10:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 10:42 [gentoo-commits] repo/gentoo:master commit in: dev-python/virtualenvwrapper/, dev-python/virtualenvwrapper/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2023-07-24 1:44 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox