[gtk-osx: 7/48] Install the libxml2 python modules in correct directory for the virtenv python.



commit 61f3f3a4adc20dfe910040bc6b8caff400172e96
Author: John Ralls <jralls ceridwen us>
Date:   Fri Nov 9 12:35:10 2018 +0900

    Install the libxml2 python modules in correct directory for the virtenv python.

 gtk-osx-setup.sh  | 1 +
 jhbuildrc-gtk-osx | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk-osx-setup.sh b/gtk-osx-setup.sh
index 7093a82..2f97551 100755
--- a/gtk-osx-setup.sh
+++ b/gtk-osx-setup.sh
@@ -148,6 +148,7 @@ if test ! -f $DEVPREFIX/bin/jhbuild ; then
 export PYTHONPATH=$PYTHONPATH
 export PIPENV_DOTENV_LOCATION=$DEVPREFIX/etc/pipenv-env
 export PIPENV_PIPFILE=$DEVPREFIX/etc/Pipfile
+export PYENV_ROOT=$PYENV_ROOT
 export CFLAGS="-I$(xcrun --show-sdk-path)/usr/include"
 export PYTHON_CONFIGURE_OPTS="--enable-shared"
 
diff --git a/jhbuildrc-gtk-osx b/jhbuildrc-gtk-osx
index 88cc631..f36a56d 100644
--- a/jhbuildrc-gtk-osx
+++ b/jhbuildrc-gtk-osx
@@ -528,9 +528,11 @@ if not _ran_recursively and _gtk_osx_prompt_prefix:
 #inside prefix. Note that we need the installed python's version to
 #get the right directory name.
 
-if (not "python" in modules and not 'python3' in modules):
-    _python_sitelib = _popen('python -c "from distutils.sysconfig import get_python_lib; 
print(get_python_lib())"')
-    _python_ver = os.path.basename(os.path.dirname(_python_sitelib))
+if not "python" in modules and not 'python3' in modules:
+    _python = os.path.join(os.environ['PYENV_ROOT'], 'shims', 'python')
+    _python_cmd = _python + ' -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"'
+    _python_libdir = _popen(_python_cmd)
+    _python_ver = os.path.basename(os.path.dirname(_python_libdir))
     _python_install_path = os.path.join(prefix, 'lib',
                                        _python_ver, 'site-packages')
     append_autogenargs('libxml2',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]