[MacPorts] #62308: clang-11: set-xcode-analyzer does not work (was: set-xcode-analyzer does not work)
MacPorts
noreply at macports.org
Sat Feb 20 09:01:08 UTC 2021
#62308: clang-11: set-xcode-analyzer does not work
-----------------------+--------------------
Reporter: szhorvat | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: | Keywords:
Port: clang-11 |
-----------------------+--------------------
Comment (by ryandesign):
> This does not make sense as it claims that the system Python is needed,
yet it uses MacPorts's Python.
The clang-11 port replaces all occurrences of /usr/bin/python in set-
xcode-analyzer with /opt/local/bin/python3.9, including the occurrence
within the comment. Before the portfile changed it, the top of the file
was:
{{{
#!/usr/bin/python
# [PR 11661] Note that we hardwire to /usr/bin/python because we
# want to the use the system version of Python on Mac OS X.
# This one has the scripting bridge enabled.
import sys
if sys.version_info < (2, 7):
print "set-xcode-analyzer requires Python 2.7 or later"
sys.exit(1)
}}}
However in clang 12 it looks like it has changed to:
{{{
#!/usr/bin/python
# [PR 11661] Note that we hardwire to /usr/bin/python because we
# want to the use the system version of Python on Mac OS X.
# This one has the scripting bridge enabled.
import sys
if sys.version_info < (3, 6):
print "set-xcode-analyzer requires Python 3.6 or later"
sys.exit(1)
}}}
...which doesn't make sense since /usr/bin/python isn't Python 3.6 or
later and also since as you point out this isn't valid Python 3 `print`
syntax.
I don't know what "the scripting bridge" is or whether we have it in the
MacPorts versions of Python.
--
Ticket URL: <https://trac.macports.org/ticket/62308#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list