<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><blockquote type="cite" class="">On 26 Oct 2021, at 18:25, Adam R. Maxwell <<a href="mailto:amaxwell@mac.com" class="">amaxwell@mac.com</a>> wrote:<br class=""><br class="">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). <br class=""><br class=""><a href="https://mjtsai.com/blog/2019/06/04/scripting-languages-to-be-removed/" class="">https://mjtsai.com/blog/2019/06/04/scripting-languages-to-be-removed/</a></blockquote><div class=""><br class=""></div><div class=""><br class=""></div>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").<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">The most difficult bit (not being a programmer myself) was to create and figure out how to use the code signing certificate, mentioned at</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://amaxwell.github.io/tlutility/Building.html" class="">https://amaxwell.github.io/tlutility/Building.html</a></div><div class=""><br class=""></div><div class="">For this,</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://eclecticlight.co/2019/01/16/code-signing-for-the-concerned-2-creating-a-personal-certificate/" class="">https://eclecticlight.co/2019/01/16/code-signing-for-the-concerned-2-creating-a-personal-certificate/</a></div><div class=""><br class=""></div><div class="">was instrumental, the procedure works exactly as described.</div><div class=""><br class=""></div><div class="">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.</div></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">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</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span class="Apple-tab-span" style="white-space:pre"> </span>% sudo xcode-select -r<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Password:<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>% xcode-select -p<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>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`)</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">rebooted and launched the locally compiled TLU: this immediately brought the dialog offering to install the command line tools.</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">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).</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">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.</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Again, I may be overly optimistic (I have a track record of often being so).</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Bruno</div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""></div><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br class=""><img apple-inline="yes" id="6FFE63B3-E585-433E-A2E5-0EFFCEBDDAF9" width="988" height="781" src="cid:54EED666-8A5C-400D-9E90-2CF9B24E2D37" class=""><br class=""><div class=""><br class=""></div></div></div></body></html>