Date: Thursday, October 6, 2022 @ 10:14:47
Author: foutrelis
Revision: 1321870
upgpkg: python-virtualenvwrapper 4.8.4-7: replace egrep (FS#76123)
Also remove ancient conflicts/replaces.
Added:
python-virtualenvwrapper/trunk/replace-egrep.patch
Modified:
python-virtualenvwrapper/trunk/PKGBUILD
---------------------+
PKGBUILD | 19 ++++++++++++-------
replace-egrep.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-10-06 10:04:17 UTC (rev 1321869)
+++ PKGBUILD 2022-10-06 10:14:47 UTC (rev 1321870)
@@ -3,7 +3,7 @@
pkgname=python-virtualenvwrapper
pkgver=4.8.4
-pkgrel=6
+pkgrel=7
pkgdesc="Extensions to Ian Bicking's virtualenv tool"
arch=('any')
url="https://virtualenvwrapper.readthedocs.io/"
@@ -11,18 +11,23 @@
depends=('python-virtualenv' 'python-virtualenv-clone' 'python-stevedore'
'which')
makedepends=('python-pbr')
-conflicts=('python2-virtualenvwrapper')
-replaces=('python2-virtualenvwrapper')
-source=(https://pypi.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-$pkgver.tar.gz)
-sha256sums=('51a1a934e7ed0ff221bdd91bf9d3b604d875afbb3aa2367133503fee168f5bfa')
+source=(https://pypi.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-$pkgver.tar.gz
+ replace-egrep.patch)
+sha256sums=('51a1a934e7ed0ff221bdd91bf9d3b604d875afbb3aa2367133503fee168f5bfa'
+ '791969953c2a65b36993163fbd804775594d2c897cf788750db5b09defdac53d')
+prepare() {
+ cd virtualenvwrapper-$pkgver
+ patch -Np1 -i ../replace-egrep.patch
+}
+
build() {
- cd "$srcdir/virtualenvwrapper-$pkgver"
+ cd virtualenvwrapper-$pkgver
python3 setup.py build
}
package() {
- cd "$srcdir/virtualenvwrapper-$pkgver"
+ cd virtualenvwrapper-$pkgver
python3 setup.py install --root="$pkgdir" -O1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Added: replace-egrep.patch
===================================================================
--- replace-egrep.patch (rev 0)
+++ replace-egrep.patch 2022-10-06 10:14:47 UTC (rev 1321870)
@@ -0,0 +1,49 @@
+From 1a7bec7500ce2af4648a70b9f301810d4afca9d3 Mon Sep 17 00:00:00 2001
+From: Alexander Huynh <[email protected]>
+Date: Mon, 12 Sep 2022 06:54:22 +0000
+Subject: [PATCH] replace deprecated `egrep` with `grep -E`
+
+On newer verions of GNU grep, this warning pops up:
+
+ egrep: warning: egrep is obsolescent; using grep -E
+
+Suppress the warning by doing what it asks. See the following for more
+detail: https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep
+---
+ virtualenvwrapper.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/virtualenvwrapper.sh b/virtualenvwrapper.sh
+index e83f666..4127a08 100644
+--- a/virtualenvwrapper.sh
++++ b/virtualenvwrapper.sh
+@@ -177,7 +177,7 @@ function virtualenvwrapper_derive_workon_home {
+ # path might contain stuff to expand.
+ # (it might be possible to do this in shell, but I don't know a
+ # cross-shell-safe way of doing it -wolever)
+- if echo "$workon_home_dir" | (unset GREP_OPTIONS; command \egrep
'([\$~]|//)' >/dev/null)
++ if echo "$workon_home_dir" | (unset GREP_OPTIONS; command \grep -E
'([\$~]|//)' >/dev/null)
+ then
+ # This will normalize the path by:
+ # - Removing extra slashes (e.g., when TMPDIR ends in a slash)
+@@ -599,7 +599,7 @@ function virtualenvwrapper_show_workon_options {
+ | command \sed "s|/$VIRTUALENVWRAPPER_ENV_BIN_DIR/activate |/|g" \
+ | command \tr "/" "\n" \
+ | command \sed "/^\s*$/d" \
+- | (unset GREP_OPTIONS; command \egrep -v '^\*$') 2>/dev/null
++ | (unset GREP_OPTIONS; command \grep -E -v '^\*$') 2>/dev/null
+ }
+
+ function _lsvirtualenv_usage {
+@@ -1306,7 +1306,7 @@ function wipeenv {
+ virtualenvwrapper_verify_active_environment || return 1
+
+ typeset req_file="$(virtualenvwrapper_tempfile "requirements.txt")"
+- pip freeze | egrep -v
'(distribute|wsgiref|appdirs|packaging|pyparsing|six)' > "$req_file"
++ pip freeze | grep -E -v
'(distribute|wsgiref|appdirs|packaging|pyparsing|six)' > "$req_file"
+ if [ -n "$(cat "$req_file")" ]
+ then
+ echo "Uninstalling packages:"
+--
+2.37.2
+