ronaldoussoren / pyobjc

The Python <-> Objective-C Bridge with bindings for macOS frameworks
https://pyobjc.readthedocs.io
560 stars 47 forks source link

Update bindings for OSX 10.12 #161

Closed ronaldoussoren closed 7 years ago

ronaldoussoren commented 8 years ago

Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


There are beta's for macOS 10.12, which means it is time to look at the SDK bindings for that version of OSX.

I'm working my way through the textual diffs between the last SDK I looked at and the headers included with Xcode 8 beta 2.

There's currently 12 frameworks that I haven't looked at at all, 5 that need more work and about 21 that aren't available from PyObjC at all (even with the 10.11 SDK).

The 12 SDKs I haven't look at are the 12 with the largest textual diff and includes some of the low-level SDKs that have required lots of manual updating in the past (such as CoreFoundation)

For the other frameworks I have updated the metadata, but I haven't run tests on a 10.12 machine. All updates are currently local on my machine and not in the repository.

ronaldoussoren commented 8 years ago

Original comment by Cory Benfield (Bitbucket: Lukasa, GitHub: Lukasa).


Assuming this is somewhat helpful: having just tried a pip install pyobjc on macOS Sierra, the initial failure for most of the frameworks that failed is almost all variations on this error:

    /System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:27:33: error: unknown property attribute 'class'
    @property (nonatomic, readonly, class, copy) NSCharacterSet *uppercaseLetterCharacterSet;
ronaldoussoren commented 8 years ago

Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


@Lukasa: Do you still get this error?

The error you're getting indicates that the compiler doesn't support class properties in Objective-C, which is something that's introduced in the compiler included with Xcode 8. Which compiler to you use?

ronaldoussoren commented 8 years ago

Original comment by Cory Benfield (Bitbucket: Lukasa, GitHub: Lukasa).


@ronaldoussoren I do not! I have XCode 8 installed so that's probably why that's gone away.

A quick test does reveal that I'm having problems with QTKit, but I haven't yet validated that this is your problem. Regardless, if you're interested:

    building 'QTKit._QTKit' extension
    creating build/temp.macosx-10.12-x86_64-3.5/Modules
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.12-x86_64-3.5/pyobjc-include -I/Users/cory/.pyenv/versions/3.5.2/include/python3.5m -c Modules/_QTKit.m -o build/temp.macosx-10.12-x86_64-3.5/Modules/_QTKit.o -DPyObjC_BUILD_RELEASE=1012 -Wno-deprecated-declarations -isysroot /
    Modules/_QTKit.m:6:9: fatal error: 'QTKit/QTKit.h' file not found
    #import <QTKit/QTKit.h>
            ^
    1 error generated.
    error: command 'clang' failed with exit status 1
ronaldoussoren commented 7 years ago

Original comment by Job Evers‐Meltzer (Bitbucket: jobevers, GitHub: jobevers).


Looking over the commits, it looks like there is a lot of progress towards 10.12 bindings. Is this almost done? Do you want/need more folks to test it out? Happy to help where I can. Thanks.

ronaldoussoren commented 7 years ago

Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


The bindings were updated in the release for PyObjC 3.2.

ronaldoussoren commented 7 years ago

Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


Removing version: 3.1 (automated comment)