[gtk-osx] Set WORKON_HOME to overide pipenv's default virtualenv directory.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-osx] Set WORKON_HOME to overide pipenv's default virtualenv directory.
- Date: Fri, 12 Nov 2021 18:57:06 +0000 (UTC)
commit 0ef4d0f86c2ffb71c7f6fc31c7e8d989d1c3af1f
Author: John Ralls <jralls ceridwen us>
Date: Fri Nov 12 10:52:59 2021 -0800
Set WORKON_HOME to overide pipenv's default virtualenv directory.
Also clean up some module warnings.
Fixes https://gitlab.gnome.org/GNOME/gtk-osx/-/issues/45
gtk-osx-setup.sh | 7 ++++---
jhbuildrc-gtk-osx | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk-osx-setup.sh b/gtk-osx-setup.sh
index 176c510b..946b55b3 100755
--- a/gtk-osx-setup.sh
+++ b/gtk-osx-setup.sh
@@ -59,7 +59,6 @@ envvar PYENV_ROOT "$DEVPREFIX/share/pyenv"
envvar PIP_CONFIG_DIR "$HOME/.config/pip"
export PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
-export PYTHONPATH="$PYTHONUSERBASE/lib/python/site-packages":"$PYTHONPATH"
if test ! -d "$DEVPREFIX/bin" ; then
mkdir -p "$DEVPREFIX/bin"
@@ -104,8 +103,8 @@ $PIP install --upgrade --user pip
# Install pipenv
$PIP install --upgrade --user pipenv==2020.11.15
-pip_remove typing
PIPENV="$PYTHONUSERBASE/bin/pipenv"
+export WORKON_HOME=$DEVPREFIX/share/virtualenvs
JHBUILD_RELEASE_VERSION=3.38.0
# Install jhbuild
@@ -114,6 +113,7 @@ if test ! -d "$DEV_SRC_ROOT/jhbuild/.git" ; then
cd "$DEV_SRC_ROOT/jhbuild"
else #Get the latest if it's already installed
cd "$DEV_SRC_ROOT/jhbuild"
+ git pull
git reset --hard $JHBUILD_RELEASE_VERSION
fi
@@ -183,7 +183,7 @@ cat <<EOF > "$DEVPREFIX/bin/jhbuild"
#!$DEVPREFIX/bin/bash
export DEVROOT="$DEVROOT"
export DEVPREFIX="$DEVPREFIX"
-export PYTHONPATH="$PYTHONPATH"
+export PYTHONUSERBASE="$PYTHONUSERBASE"
export PIPENV_DOTENV_LOCATION="$DEVPREFIX/etc/pipenv-env"
export PIPENV_PIPFILE="$DEVPREFIX/etc/Pipfile"
export PYENV_ROOT="$PYENV_ROOT"
@@ -191,6 +191,7 @@ export PYENV_VERSION="$PYENV_VERSION"
export PATH="$PYENV_ROOT/shims:$PATH"
export CARGO_HOME="$CARGO_HOME"
export RUSTUP_HOME="$RUSTUP_HOME"
+export WORKON_HOME="$WORKON_HOME"
exec $DEVPREFIX/bin/pipenv run jhbuild \$@
EOF
diff --git a/jhbuildrc-gtk-osx b/jhbuildrc-gtk-osx
index aea4b156..13e8baca 100644
--- a/jhbuildrc-gtk-osx
+++ b/jhbuildrc-gtk-osx
@@ -626,9 +626,9 @@ else:
append_autogenargs('libxml2',
'--with-python-install-dir=' + _python_install_path)
environ_append('PYTHONPATH', _python_install_path, ':')
- python_library_path = os.path.join(os.environ['PYENV_ROOT'], 'versions',
+ _python_library_path = os.path.join(os.environ['PYENV_ROOT'], 'versions',
os.environ['PYENV_VERSION'], 'lib')
- environ_append('LDFLAGS', '-L' + python_library_path)
+ environ_append('LDFLAGS', '-L' + _python_library_path)
os.environ['PYTHON'] = sys.executable
module_extra_env["pygtk"] = {'PYTHON':os.path.join(prefix, 'bin', 'python2')}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]