summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2024-10-29 17:38:26 +0200
committerNowa Ammerlaan <nowa@gentoo.org>2025-02-11 16:24:56 +0100
commit3edd6bd564e3495bacb9b0c6340cefd07c9817c2 (patch)
tree5b1d15f5d9a8d1158044b748d28b97228c5a9f08
parentdev-python/qtpy: add 2.4.3 (diff)
downloadgentoo-3edd6bd564e3495bacb9b0c6340cefd07c9817c2.tar.gz
gentoo-3edd6bd564e3495bacb9b0c6340cefd07c9817c2.tar.bz2
gentoo-3edd6bd564e3495bacb9b0c6340cefd07c9817c2.zip
dev-python/virtualenvwrapper: add 6.1.1
Add optional testing for zsh and more effort in getting tests to work reliably. Also python3.13 support. Bug: https://bugs.gentoo.org/936086 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/40523 Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
-rw-r--r--dev-python/virtualenvwrapper/Manifest1
-rw-r--r--dev-python/virtualenvwrapper/virtualenvwrapper-6.1.1.ebuild98
2 files changed, 99 insertions, 0 deletions
diff --git a/dev-python/virtualenvwrapper/Manifest b/dev-python/virtualenvwrapper/Manifest
index 38deaed880b4..11167cc0509e 100644
--- a/dev-python/virtualenvwrapper/Manifest
+++ b/dev-python/virtualenvwrapper/Manifest
@@ -1 +1,2 @@
DIST virtualenvwrapper-6.1.0.tar.gz 95880 BLAKE2B 86d37682148ee132f9be5c4554de3c770c0f1c3055441bbce080d94da6fa83fc138a15c4c7edbb525e0c303c3c2ba5c1b1ee23260ea5bafaab157b3699b39b87 SHA512 78e09956132862fbf1caf53cb6c9375aa3718685f72d8f3fb61e402e6b26e8568d5b3a3ed18142b14f3b2691f89e6f912782e813d8139dc71ceb7e47bde8d0b0
+DIST virtualenvwrapper-6.1.1.tar.gz 95964 BLAKE2B 722fee78cdadbde77e03b22458f1591e9540ef12cd7deb14ecfa8abf1b030d16f8548b31297832eaf843d5b1db8453c239ff42162d66a74490339ab77e8ccc37 SHA512 1d2095c79f3679a4068418fe6e740771334bf0be44961dc5a50ac4848c83b5af046fc6125497177b864603efc4f2a0aacc912185129b8eb510dc4dcdef661853
diff --git a/dev-python/virtualenvwrapper/virtualenvwrapper-6.1.1.ebuild b/dev-python/virtualenvwrapper/virtualenvwrapper-6.1.1.ebuild
new file mode 100644
index 000000000000..348f62c23963
--- /dev/null
+++ b/dev-python/virtualenvwrapper/virtualenvwrapper-6.1.1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2025 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..13} )
+
+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? (
+ $(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 + bug #936086
+ rm tests/test_mkvirtualenv_install.sh || die
+ rm tests/test_mkvirtualenv_requirements.sh || die
+ sed -i -e '/test_new_env_activated () {/,/}/ d' tests/test_cp.sh || die
+ sed -i -e '/test_wipeenv () {/,/}/ d' tests/test_wipeenv.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}"
+ local -x USING_TOX=1
+
+ # Make sure that users env doesn't leak to tests
+ unset VIRTUALENVWRAPPER_SCRIPT
+ unset _VIRTUALENVWRAPPER_API
+
+ local old_path="${PATH}"
+
+ # Tests are based on how upstream tox handles it
+
+ cp -a "${BUILD_DIR}"/{install/usr,test_bash} || die
+ local -x VIRTUAL_ENV="${BUILD_DIR}/test_bash"
+ touch "${VIRTUAL_ENV}"/bin/activate || die # silence warning
+
+ local -x PATH="${VIRTUAL_ENV}/bin:${old_path}"
+ local -x SHELL="/bin/bash"
+ local -x test_shell_opts=
+
+ bash ./tests/run_tests "${VIRTUAL_ENV}" || die "Tests failed under ${EPYTHON} with bash"
+
+ if has_version app-shells/zsh; then
+ cp -a "${BUILD_DIR}"/{install/usr,test_zsh} || die
+ local -x VIRTUAL_ENV="${BUILD_DIR}/test_zsh"
+ touch "${VIRTUAL_ENV}"/bin/activate || die # silence warning
+
+ local -x PATH="${VIRTUAL_ENV}/bin:${old_path}"
+ local -x SHELL="/bin/zsh"
+ local -x test_shell_opts="-o shwordsplit"
+
+ zsh -o shwordsplit ./tests/run_tests "${VIRTUAL_ENV}" || die "Tests failed under ${EPYTHON} with zsh"
+ fi
+}