[tlu] Monterey and TLU

Bruno Voisin bvoisin at icloud.com
Tue Oct 26 21:54:48 CEST 2021

> On 26 Oct 2021, at 18:25, Adam R. Maxwell <amaxwell at mac.com> wrote:
> Thanks, guys. It's helpful to see the content of that alert, which is unhelpful and <opprobrious epithet deleted>. Apple's plan is to entirely remove Python as a giant FU to developers who accepted it as part of the system (I recall a time when Apple was pushing Python and Ruby as first-class application languages, with Xcode templates to develop applications). 
> https://mjtsai.com/blog/2019/06/04/scripting-languages-to-be-removed/

Call me overly optimistic, but the way the Xcode 11 Release Notes linked there put it, namely "In future versions of macOS, scripting language runtimes won’t be available by default, and may require you to install an additional package" makes me think the scripting languages will be removed from macOS, but still be provided with the developer tools (aka the above "additional package").

For example, in the same release notes there's "LLDB’s Python scripting is now based on Python 3". So I can't see how Apple could remove Python 3 from the developer tools.

Which would mean that the first time a scripting language is called, the "Install Command Line Developer Tools" application would pop up and, if you agree, install the tools including, here, Python 3. This procedure doesn't require an Apple ID, just agreeing to a licence agreement, so I tend to think it would be acceptable to the user.

I "just" did an experiment: reinstall back Xcode, get the TLU source code and replace in it all calls of python (through /usr/bin/python and /usr/bin/env python) by calls of python3, then build the app in Xcode.

The most difficult bit (not being a programmer myself) was to create and figure out how to use the code signing certificate, mentioned at


For this,


was instrumental, the procedure works exactly as described.

First, after selecting the Runtime scheme and pressing the Build button, there were a number a warnings. I let Xcode self-correct those about localization, was clueless about the other issues Xcode didn't offer to correct, then for some reason Xcode opened a TLU window in which TLU seemed to work OK (screenshot attached). The TLU log entry says Python 3 is used; so TLU does work with Python 3.

At that point I noticed Xcode had created a TLU app inside ~/Library/Developer/Xcode/DerivedData/TeX_Live_Utility-<random-string>/Build/Products/Release. I copied this app to the Desktop, moved /Library/Developer/CommandLineTools and /Applications/Xcode.app to the Bin, made sure the command line tools were truely gone

	% sudo xcode-select -r
	% xcode-select -p
	xcode-select: error: unable to get active developer directory, use `sudo xcode-select --switch path/to/Xcode.app` to set one (or see `man xcode-select`)

rebooted and launched the locally compiled TLU: this immediately brought the dialog offering to install the command line tools.

Having done that, the locally compiled TLU seems to work OK, exactly as in the attached screenshot (I haven't tried to actually update packages with it though).

So it seems TLU could be provided with calls to python3 when macOS Monterey is detected, such that on first launch TLU would trigger the Install Command Line Tools app, resulting in installation of the tools including Python 3, and successful operation of TLU afterwards.

Again, I may be overly optimistic (I have a track record of often being so).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tlu/attachments/20211026/8817e9e8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TLU-P3-Test.png
Type: image/png
Size: 1363408 bytes
Desc: not available
URL: <https://tug.org/pipermail/tlu/attachments/20211026/8817e9e8/attachment-0001.png>

More information about the tlu mailing list.