[MacPorts] #62308: set-xcode-analyzer does not work

MacPorts noreply at macports.org
Tue Feb 16 10:24:13 UTC 2021


#62308: set-xcode-analyzer does not work
----------------------+----------------------
 Reporter:  szhorvat  |      Owner:  (none)
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:  2.6.4
 Keywords:            |       Port:  clang-11
----------------------+----------------------
 Trying to run `set-xcode-analyzer-mp-11` fails with an error. It appears
 that this tool is for Python 2.7 only, but it is set up to run with
 MacPorts's own python3.9, thus it fails due to the old `print` statement.

 {{{
 ~ $ set-xcode-analyzer-mp-11
   File "/opt/local/libexec/llvm-11/bin/set-xcode-analyzer", line 9
     print "set-xcode-analyzer requires Python 2.7 or later"
           ^
 SyntaxError: Missing parentheses in call to 'print'. Did you mean print
 ("set-xcode-analyzer requires Python 2.7 or later")?
 ~ [1] $
 }}}

 The comment inside the script says:

 {{{
 #!/opt/local/bin/python3.9

 # [PR 11661] Note that we hardwire to /opt/local/bin/python3.9 because we
 # want to the use the system version of Python on Mac OS X.
 # This one has the scripting bridge enabled.
 }}}

 This does not make sense as it claims that the system Python is needed,
 yet it uses MacPorts's Python.

-- 
Ticket URL: <https://trac.macports.org/ticket/62308>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list