Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Path module #20

Open
thomashollier opened this issue Aug 22, 2024 · 5 comments
Open

Problem with Path module #20

thomashollier opened this issue Aug 22, 2024 · 5 comments

Comments

@thomashollier
Copy link

Thanks a lot for your work making this available on M1 macs. It's so much better for me to be able to run this on my local machine.

I grabbed your last "build-PIP-TAR #179" and there seems to be some kind of confusion between pathlib and os.path. When I click on the render button, nothing happens and the traceback says: AttributeError: 'Path' object has no attribute 'abspath'

I grabbed an older version and the problem wasn't there. I tried to figure out what file it was coming from but I'm not a dev and couldn't figure it out.

@jdegenstein
Copy link
Owner

First off, thanks for reporting -- I hadn't noticed this issue before and I was immediately able to reproduce the issue. According to the release notes for path==17.0.0 the abspath method was removed. I removed reference to abspath and replaced with absolute instead and it is tested and working on my machine.

https://github.com/jaraco/path/blob/757d8a3bdf7a94f95d392215b9586589b99f7a81/NEWS.rst#L7

Glad to hear the Apple silicon has worked out well for you in the past. Can you confirm the new build here is working correctly on your machine? I would like to publish a release with all 4 supported platforms/CPUs soon but have been unable to test the Apple silicon version.

new build:
https://github.com/jdegenstein/jmwright-CQ-Editor/actions/runs/10513000076

@thomashollier
Copy link
Author

That fixed it. A couple of notes on additional steps I had to take:
Changed to cocoa:
QT_QPA_PLATFORM=cocoa

Also, Apple's security system (gatekeeper) required me to tag all the included binaries as approved, and it took me a while to figure out the efficient way to do all the .so and .dylib files in the terminal.

enable the ApprovedApps label:

sudo spctl --enable --label "ApprovedApps"

apply the label to all the executables in the directory:

for a in find CQ-editor -type f -name "*so"; do; sudo spctl --add --label "ApprovedApps" $(pwd)/$a;done
for a in find CQ-editor -type f -name "*dylib"; do; sudo spctl --add --label "ApprovedApps" $(pwd)/$a;done
sudo spctl --add --label "ApprovedApps" CQ-editor/CQ-editor

Or one could disable the security altogether but not really recommended:
sudo spctl --global-disable
sudo spctl --master-disable

@jdegenstein
Copy link
Owner

I went ahead and published a new release (including MacOS-arm64), but I have not had a chance to add the ApprovedApps labeling yet. I did add the QT_QPA_PLATFORM=cocoa that you suggested.

@thomashollier
Copy link
Author

thomashollier commented Sep 17, 2024 via email

@jdegenstein
Copy link
Owner

Yeah I think you are right, wondering if I can include a script at least so the user can run it and help streamline the process?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants