gtk-osx-setup.sh doesn't recognize python3.7 installed by XCode
I'm trying to package a python GTK app (Terminator) on mac, and I'm running into no end of troubles.
I tried following the directions at https://wiki.gnome.org/action/show/Projects/GTK/OSX/Building?action=show&redirect=Projects%2FGTK%2B%2FOSX%2FBuilding and I got this error in jhbuild jhbuild#70
I had a theory that it may be due to the version of python installed by gtk-osx-setup.sh, but when I try to run it and not have it download and install python 3.6.10 (btw, is there any particular reason for that version?), and instead just have it use the version installed by xcode, the utilities installed in ~/.new_local/bin all have the path to the 2.7 version hardcoded in the #! line.
Is there any way to just have gtk-osx-setup.sh detect and use an existing python3 installation? I'm running this on a clean machine without homebrew or anything else, other than XCode.
mattrose@macvm-1 ~ % bash gtk-osx-setup.sh
Cloning into '/Users/mattrose/Source/pyenv'...
remote: Enumerating objects: 18133, done.
remote: Total 18133 (delta 0), reused 0 (delta 0), pack-reused 18133
Receiving objects: 100% (18133/18133), 3.60 MiB | 2.93 MiB/s, done.
Resolving deltas: 100% (12334/12334), done.
Looking in links: /var/folders/2r/tfvtq64d5nq_wlt71wcr7hzc0000gn/T/tmphiLt61
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (41.0.1)
Collecting pip
Installing collected packages: pip
Successfully installed pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/bd/b1/56a834acdbe23b486dea16aaf4c27ed28eb292695b90d01dff96c96597de/pip-20.2.1-py2.py3-none-any.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 2.7MB/s
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-20.2.1
Collecting pipenv==2018.10.09
Downloading pipenv-2018.10.9-py2-none-any.whl (5.1 MB)
|████████████████████████████████| 5.1 MB 31 kB/s
Requirement already satisfied, skipping upgrade: enum34; python_version < "3" in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pipenv==2018.10.09) (1.1.6)
Collecting certifi
Downloading certifi-2020.6.20-py2.py3-none-any.whl (156 kB)
|████████████████████████████████| 156 kB 35 kB/s
Collecting virtualenv-clone>=0.2.5
Downloading virtualenv_clone-0.5.4-py2.py3-none-any.whl (6.6 kB)
Requirement already satisfied, skipping upgrade: setuptools>=36.2.1 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pipenv==2018.10.09) (41.0.1)
Collecting virtualenv
Downloading virtualenv-20.0.30-py2.py3-none-any.whl (7.1 MB)
|████████████████████████████████| 7.1 MB 11 kB/s
Collecting typing; python_version < "3.5"
Downloading typing-3.7.4.3-py2-none-any.whl (26 kB)
Requirement already satisfied, skipping upgrade: pip>=9.0.1 in ./.new_local/lib/python/site-packages (from pipenv==2018.10.09) (20.2.1)
Collecting importlib-metadata<2,>=0.12; python_version < "3.8"
Downloading importlib_metadata-1.7.0-py2.py3-none-any.whl (31 kB)
Collecting importlib-resources>=1.0; python_version < "3.7"
Downloading importlib_resources-3.0.0-py2.py3-none-any.whl (23 kB)
Collecting pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32"
Downloading pathlib2-2.3.5-py2.py3-none-any.whl (18 kB)
Requirement already satisfied, skipping upgrade: six<2,>=1.9.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from virtualenv->pipenv==2018.10.09) (1.12.0)
Collecting distlib<1,>=0.3.1
Downloading distlib-0.3.1-py2.py3-none-any.whl (335 kB)
|████████████████████████████████| 335 kB 1.0 MB/s
Collecting appdirs<2,>=1.4.3
Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting filelock<4,>=3.0.0
Downloading filelock-3.0.12.tar.gz (8.5 kB)
Collecting configparser>=3.5; python_version < "3"
Downloading configparser-4.0.2-py2.py3-none-any.whl (22 kB)
Collecting zipp>=0.5
Downloading zipp-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting contextlib2; python_version < "3"
Downloading contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Collecting singledispatch; python_version < "3.4"
Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl (12 kB)
Collecting scandir; python_version < "3.5"
Downloading scandir-1.10.0.tar.gz (33 kB)
Building wheels for collected packages: filelock, scandir
Building wheel for filelock (setup.py) ... done
Created wheel for filelock: filename=filelock-3.0.12-py2-none-any.whl size=7574 sha256=f885641da6da868fb9c8d59f222a2a7c4c1672288b3a7d5c9e4c16ed0db6776c
Stored in directory: /Users/mattrose/Library/Caches/pip/wheels/b9/91/23/b559c1f4fd55056712b3a71cd9cab1dc0089e2232d502ed72e
Building wheel for scandir (setup.py) ... done
Created wheel for scandir: filename=scandir-1.10.0-cp27-cp27m-macosx_10_15_x86_64.whl size=18245 sha256=41ca521221959ed75e9d9750fcaeee764c1cbc1ddbc8f9974ae1ad4fa69909c4
Stored in directory: /Users/mattrose/Library/Caches/pip/wheels/58/2c/26/52406f7d1f19bcc47a6fbd1037a5f293492f5cf1d58c539edb
Successfully built filelock scandir
Installing collected packages: certifi, virtualenv-clone, configparser, contextlib2, zipp, scandir, pathlib2, importlib-metadata, typing, singledispatch, importlib-resources, distlib, appdirs, filelock, virtualenv, pipenv
WARNING: The script virtualenv-clone is installed in '/Users/mattrose/.new_local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script virtualenv is installed in '/Users/mattrose/.new_local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts pipenv and pipenv-resolver are installed in '/Users/mattrose/.new_local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed appdirs-1.4.4 certifi-2020.6.20 configparser-4.0.2 contextlib2-0.6.0.post1 distlib-0.3.1 filelock-3.0.12 importlib-metadata-1.7.0 importlib-resources-3.0.0 pathlib2-2.3.5 pipenv-2018.10.9 scandir-1.10.0 singledispatch-3.4.0.3 typing-3.7.4.3 virtualenv-20.0.30 virtualenv-clone-0.5.4 zipp-1.2.0
Location: /Users/mattrose/.new_local/lib/python/site-packages
Found existing installation: typing 3.7.4.3
Uninstalling typing-3.7.4.3:
Successfully uninstalled typing-3.7.4.3
Cloning into '/Users/mattrose/Source/jhbuild'...
remote: Enumerating objects: 167, done.
remote: Counting objects: 100% (167/167), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 52953 (delta 107), reused 106 (delta 67), pack-reused 52786
Receiving objects: 100% (52953/52953), 12.93 MiB | 1.23 MiB/s, done.
Resolving deltas: 100% (40786/40786), done.
Note: switching to 'a05fc06b5c0caaf85f4fb30c40c08fdf6d1a8a82'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Archive: /Users/mattrose/.new_local/ninja-mac.zip
inflating: /Users/mattrose/.new_local/bin/ninja
PATH does not contain /Users/mattrose/.new_local/bin. You probably want to fix that.
Warning: the environment variable LANG is not set!
We recommend setting this in ~/.profile (or equivalent) for proper expected behavior.
Warning: Python 3.6 was not found on your system…
Would you like us to install CPython 3.6.11 with pyenv? [Y/n]: n
You can specify specific versions of Python with:
$ pipenv --python path/to/python
/Users/mattrose/.new_local/lib/python/site-packages/pipenv/vendor/vistir/compat.py:109: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/var/folders/2r/tfvtq64d5nq_wlt71wcr7hzc0000gn/T/pipenv-jD5BMy-requirements'>
warnings.warn(warn_message, ResourceWarning)
Installing jhbuild configuration at /Users/mattrose/.config/jhbuildrc
Installing jhbuild custom configuration at /Users/mattrose/.config/jhbuildrc-custom