[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Pyqtdeploy fix for latest macOS cmd line tools
From:       Patrick Stinson <patrickkidd () gmail ! com>
Date:       2022-03-29 0:59:25
Message-ID: CADb17j3XUHMR3XwrsxEUD1hvSEd_VMQVOhwT4vuOC2rVAg4+CQ () mail ! gmail ! com
[Download RAW message or body]

Coming back to this, this code block is blowing up in pyqtdeploy-3.1.2 on a
fresh install of Monterey even when Xcode is installed. I haven't used an
updated version of pyqtdeploy for some months so I'm not sure when this
started happening.

I applied the previously mentioned fix to get around it.

On Fri, Sep 24, 2021 at 8:39 PM Patrick Stinson <patrickkidd@gmail.com>
wrote:

> Shoot, you know, looks like you can scratch that. There was only a problem
> when Xcode was not installed, and Xcode is required anyway.
>
> Nevertheless, I think `xcrun —show-sdk-version` is a more straightforward
> way to get the version number without parsing a file path.
>
> On Sep 24, 2021, at 4:20 PM, Patrick Stinson <patrickkidd@gmail.com>
> wrote:
>
> Phil,
>
> Sorry if I'm ignorant as to whether the latest pyqtdeploy will still work
> with Qt-5.15.2 (I just want my stuff to keep building), but here is a fix
> to get `pyqtdeploy/platform.py` to correctly read the new macOS sdk version
> number:
>
>
> # Parse the version number.
> # version_str = os.path.basename(self.apple_sdk)
>
> # if version_str.startswith(self.sdk_prefix):
> # version_str = version_str[len(self.sdk_prefix):]
>
> # if version_str.endswith('.sdk'):
> # version_str = version_str[:-len('.sdk')]
>
> version_str = self.run('xcrun', '--show-sdk-version', message_handler=
> message_handler, capture=True)
>
>
> -Patrick
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr">Coming back to this, this code block is blowing up in pyqtdeploy-3.1.2 \
on a fresh install of Monterey even when Xcode is installed. I haven&#39;t used an \
updated version of pyqtdeploy for some months so I&#39;m not sure when this started \
happening.<div><br></div><div>I applied the previously mentioned fix to get around \
it.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, \
Sep 24, 2021 at 8:39 PM Patrick Stinson &lt;<a \
href="mailto:patrickkidd@gmail.com">patrickkidd@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
style="word-wrap:break-word;line-break:after-white-space">Shoot, you know, looks like \
you can scratch that. There was only a problem when Xcode was not installed, and \
Xcode is required anyway.<div><br></div><div>Nevertheless, I think `xcrun \
—show-sdk-version` is a more straightforward way to get the version number without \
parsing a file path.<br><div><br><blockquote type="cite"><div>On Sep 24, 2021, at \
4:20 PM, Patrick Stinson &lt;<a href="mailto:patrickkidd@gmail.com" \
target="_blank">patrickkidd@gmail.com</a>&gt; wrote:</div><br><div><div \
style="word-wrap:break-word;line-break:after-white-space">Phil,<br><br>Sorry if I'm \
ignorant as to whether the latest pyqtdeploy will still work with Qt-5.15.2 (I just \
want my stuff to keep building), but  here is a fix to get `pyqtdeploy/platform.py` \
to correctly read the new macOS sdk version number:<br><br><br><div \
style="color:rgb(54,54,54);background-color:rgb(255,255,255);font-family:Menlo,Monaco,&quot;Courier \
New&quot;,monospace;line-height:18px;white-space:pre-wrap"><div>        <span \
style="color:rgb(146,205,120)"># Parse the version number.</span></div><div>        \
<span style="color:rgb(146,205,120)"># version_str = \
os.path.basename(self.apple_sdk)</span></div><br><div>        <span \
style="color:rgb(146,205,120)"># if \
version_str.startswith(self.sdk_prefix):</span></div><div>        <span \
style="color:rgb(146,205,120)">#     version_str = \
version_str[len(self.sdk_prefix):]</span></div><br><div>        <span \
style="color:rgb(146,205,120)"># if \
version_str.endswith(&#39;.sdk&#39;):</span></div><div>        <span \
style="color:rgb(146,205,120)">#     version_str = \
version_str[:-len(&#39;.sdk&#39;)]</span></div><br><div>        <span \
style="color:rgb(9,89,132)">version_str</span> = <span \
style="color:rgb(9,89,132)">self</span>.<span \
style="color:rgb(99,99,36)">run</span>(<span \
style="color:rgb(162,86,55)">&#39;xcrun&#39;</span>, <span \
style="color:rgb(162,86,55)">&#39;--show-sdk-version&#39;</span>, <span \
style="color:rgb(9,89,132)">message_handler</span>=<span \
style="color:rgb(9,89,132)">message_handler</span>, <span \
style="color:rgb(9,89,132)">capture</span>=<span \
style="color:rgb(63,151,223)">True</span>)</div></div><br><div><br></div><div>-Patrick \
</div><div><br></div></div></div></blockquote></div><br></div></div></blockquote></div>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic