pyobjc-framework-ExtensionKit 10.1__tar.gz → 11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/ExtensionKit/_metadata.py +1 -1
  2. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/pyobjc_framework_ExtensionKit.egg-info/PKG-INFO +5 -5
  3. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/pyobjc_framework_ExtensionKit.egg-info/SOURCES.txt +5 -2
  4. pyobjc_framework_extensionkit-11.0/Lib/pyobjc_framework_ExtensionKit.egg-info/pyobjc-build-info.txt +3 -0
  5. pyobjc_framework_extensionkit-11.0/Lib/pyobjc_framework_ExtensionKit.egg-info/requires.txt +2 -0
  6. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/License.txt +1 -1
  7. pyobjc_framework_extensionkit-11.0/Modules/_ExtensionKit.m +67 -0
  8. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Modules/pyobjc-api.h +1 -1
  9. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Modules/pyobjc-compat.h +80 -5
  10. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/PKG-INFO +5 -5
  11. pyobjc_framework_extensionkit-11.0/metadata/raw/arm64-14.5.fwinfo +179 -0
  12. pyobjc-framework-ExtensionKit-10.1/metadata/raw/arm64-14.0.fwinfo → pyobjc_framework_extensionkit-11.0/metadata/raw/arm64-15.0.fwinfo +2 -2
  13. pyobjc_framework_extensionkit-11.0/metadata/raw/x86_64-14.5.fwinfo +179 -0
  14. pyobjc-framework-ExtensionKit-10.1/metadata/raw/x86_64-14.0.fwinfo → pyobjc_framework_extensionkit-11.0/metadata/raw/x86_64-15.0.fwinfo +2 -2
  15. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/pyobjc_setup.py +121 -27
  16. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/setup.py +1 -3
  17. pyobjc-framework-ExtensionKit-10.1/Lib/pyobjc_framework_ExtensionKit.egg-info/requires.txt +0 -2
  18. pyobjc-framework-ExtensionKit-10.1/Modules/_ExtensionKit.m +0 -36
  19. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/ExtensionKit/__init__.py +0 -0
  20. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/pyobjc_framework_ExtensionKit.egg-info/dependency_links.txt +0 -0
  21. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/pyobjc_framework_ExtensionKit.egg-info/not-zip-safe +0 -0
  22. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Lib/pyobjc_framework_ExtensionKit.egg-info/top_level.txt +0 -0
  23. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/MANIFEST.in +0 -0
  24. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/Modules/_ExtensionKit_protocols.m +0 -0
  25. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/PyObjCTest/__init__.py +0 -0
  26. /pyobjc-framework-ExtensionKit-10.1/PyObjCTest/test_exappExtensionbrowserviewcontroller.py → /pyobjc_framework_extensionkit-11.0/PyObjCTest/test_exappextensionbrowserviewcontroller.py +0 -0
  27. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/PyObjCTest/test_exhostviewcontroller.py +0 -0
  28. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/PyObjCTest/test_extensionkit.py +0 -0
  29. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/metadata/ExtensionKit.fwinfo +0 -0
  30. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/metadata/metadata.ini +0 -0
  31. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/metadata/raw/arm64-13.0.fwinfo +0 -0
  32. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/metadata/raw/x86_64-13.0.fwinfo +0 -0
  33. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/pyproject.toml +0 -0
  34. {pyobjc-framework-ExtensionKit-10.1 → pyobjc_framework_extensionkit-11.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  # This file is generated by objective.metadata
2
2
  #
3
- # Last update: Sat Jul 1 14:05:03 2023
3
+ # Last update: Tue Jun 11 10:10:47 2024
4
4
  #
5
5
  # flake8: noqa
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobjc-framework-ExtensionKit
3
- Version: 10.1
3
+ Version: 11.0
4
4
  Summary: Wrappers for the framework ExtensionKit on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -18,20 +18,20 @@ Classifier: Operating System :: MacOS :: MacOS X
18
18
  Classifier: Programming Language :: Python
19
19
  Classifier: Programming Language :: Python :: 3
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Programming Language :: Python :: 3.8
22
21
  Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
28
28
  Classifier: Programming Language :: Objective C
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Classifier: Topic :: Software Development :: User Interfaces
31
- Requires-Python: >=3.8
31
+ Requires-Python: >=3.9
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
- Requires-Dist: pyobjc-core>=10.1
34
- Requires-Dist: pyobjc-framework-Cocoa>=10.1
33
+ Requires-Dist: pyobjc-core>=11.0
34
+ Requires-Dist: pyobjc-framework-Cocoa>=11.0
35
35
  Project-URL: Documentation, https://pyobjc.readthedocs.io/en/latest/
36
36
  Project-URL: Issue tracker, https://github.com/ronaldoussoren/pyobjc/issues
37
37
  Project-URL: Repository, https://github.com/ronaldoussoren/pyobjc
@@ -9,6 +9,7 @@ Lib/pyobjc_framework_ExtensionKit.egg-info/PKG-INFO
9
9
  Lib/pyobjc_framework_ExtensionKit.egg-info/SOURCES.txt
10
10
  Lib/pyobjc_framework_ExtensionKit.egg-info/dependency_links.txt
11
11
  Lib/pyobjc_framework_ExtensionKit.egg-info/not-zip-safe
12
+ Lib/pyobjc_framework_ExtensionKit.egg-info/pyobjc-build-info.txt
12
13
  Lib/pyobjc_framework_ExtensionKit.egg-info/requires.txt
13
14
  Lib/pyobjc_framework_ExtensionKit.egg-info/top_level.txt
14
15
  Modules/_ExtensionKit.m
@@ -23,6 +24,8 @@ PyObjCTest/test_extensionkit.py
23
24
  metadata/ExtensionKit.fwinfo
24
25
  metadata/metadata.ini
25
26
  metadata/raw/arm64-13.0.fwinfo
26
- metadata/raw/arm64-14.0.fwinfo
27
+ metadata/raw/arm64-14.5.fwinfo
28
+ metadata/raw/arm64-15.0.fwinfo
27
29
  metadata/raw/x86_64-13.0.fwinfo
28
- metadata/raw/x86_64-14.0.fwinfo
30
+ metadata/raw/x86_64-14.5.fwinfo
31
+ metadata/raw/x86_64-15.0.fwinfo
@@ -0,0 +1,3 @@
1
+ macOS 15.3 (24D5040f)
2
+ Apple clang version 16.0.0 (clang-1600.0.26.6)
3
+ SDK: macOS 15.2
@@ -0,0 +1,2 @@
1
+ pyobjc-core>=11.0
2
+ pyobjc-framework-Cocoa>=11.0
@@ -1,7 +1,7 @@
1
1
  (This is the MIT license, note that libffi-src is a separate product with its own license)
2
2
 
3
3
  Copyright 2002, 2003 - Bill Bumgarner, Ronald Oussoren, Steve Majewski, Lele Gaifax, et.al.
4
- Copyright 2003-2022 - Ronald Oussoren
4
+ Copyright 2003-2024 - Ronald Oussoren
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
7
 
@@ -0,0 +1,67 @@
1
+ #define PY_SSIZE_T_CLEAN
2
+ #include "Python.h"
3
+ #include "pyobjc-api.h"
4
+
5
+ #import <ExtensionKit/ExtensionKit.h>
6
+ #import <Foundation/Foundation.h>
7
+
8
+ /* We include the source code here instead of
9
+ * using the linker due to limitations in pyobjc-api.h
10
+ */
11
+ #include "_ExtensionKit_protocols.m"
12
+
13
+ static PyMethodDef mod_methods[] = {
14
+ {0, 0, 0, 0} /* sentinel */
15
+ };
16
+
17
+ static int mod_exec_module(PyObject* m)
18
+ {
19
+ return 0;
20
+ }
21
+
22
+ static struct PyModuleDef_Slot mod_slots[] = {
23
+ {
24
+ .slot = Py_mod_exec,
25
+ .value = (void*)mod_exec_module
26
+ },
27
+ #if PY_VERSION_HEX >= 0x030c0000
28
+ {
29
+ /* This extension does not use the CPython API other than initializing
30
+ * the module, hence is safe with subinterpreters and per-interpreter
31
+ * GILs
32
+ */
33
+ .slot = Py_mod_multiple_interpreters,
34
+ .value = Py_MOD_PER_INTERPRETER_GIL_SUPPORTED,
35
+ },
36
+ #endif
37
+ #if PY_VERSION_HEX >= 0x030d0000
38
+ {
39
+ /* The code in this extension should be safe to use without the GIL */
40
+ .slot = Py_mod_gil,
41
+ .value = Py_MOD_GIL_NOT_USED,
42
+ },
43
+ #endif
44
+ { /* Sentinel */
45
+ .slot = 0,
46
+ .value = 0
47
+ }
48
+ };
49
+
50
+ static struct PyModuleDef mod_module = {
51
+ .m_base = PyModuleDef_HEAD_INIT,
52
+ .m_name = "_ExtensionKit",
53
+ .m_doc = NULL,
54
+ .m_size = 0,
55
+ .m_methods = mod_methods,
56
+ .m_slots = mod_slots,
57
+ .m_traverse = NULL,
58
+ .m_clear = NULL,
59
+ .m_free = NULL,
60
+ };
61
+
62
+ PyObject* PyInit__ExtensionKit(void);
63
+
64
+ PyObject* __attribute__((__visibility__("default"))) PyInit__ExtensionKit(void)
65
+ {
66
+ return PyModuleDef_Init(&mod_module);
67
+ }
@@ -83,7 +83,7 @@ struct pyobjc_api {
83
83
  PyObject* _Nullable (*_Nonnull unsupported_method_caller)(
84
84
  PyObject* _Nonnull, PyObject* _Nonnull, PyObject* _Nonnull const* _Nonnull,
85
85
  size_t);
86
- void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state);
86
+ void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state) __attribute__((__noreturn__));
87
87
  int (*_Nonnull simplify_sig)(const char* signature, char* buf, size_t buflen);
88
88
  void (*_Nonnull free_c_array)(int, Py_buffer*);
89
89
  int (*_Nonnull py_to_c_array)(BOOL, BOOL, const char* _Nonnull, PyObject* _Nonnull,
@@ -11,6 +11,12 @@
11
11
 
12
12
  NS_ASSUME_NONNULL_BEGIN
13
13
 
14
+ #ifdef USE_STATIC_ANALYZER
15
+ #define CLANG_SUPPRESS [[clang::suppress]]
16
+ #else
17
+ #define CLANG_SUPPRESS
18
+ #endif
19
+
14
20
  /*
15
21
  *
16
22
  * Start of compiler definitions
@@ -153,10 +159,6 @@ extern PyObject* _Nullable PyObject_VectorcallMethod(
153
159
 
154
160
  extern int PyObjC_Cmp(PyObject* o1, PyObject* o2, int* result);
155
161
 
156
- extern PyObject* _Nullable PyObjCBytes_InternFromString(const char* v);
157
- extern PyObject* _Nullable PyObjCBytes_InternFromStringAndSize(const char* v,
158
- Py_ssize_t l);
159
-
160
162
  /*
161
163
  * A micro optimization: when using Python 3.3 or later it
162
164
  * is possible to access a 'char*' with an ASCII representation
@@ -238,7 +240,80 @@ _PyObjCTuple_GetItem(PyObject* tuple, Py_ssize_t idx)
238
240
  PyGILState_Release(_GILState); \
239
241
  } while (0)
240
242
 
241
- extern PyObject* _Nullable PyObjC_get_tp_dict(PyTypeObject* _Nonnull tp);
243
+ #if PY_VERSION_HEX < 0x030a0000
244
+
245
+ static inline PyObject* Py_NewRef(PyObject* o)
246
+ {
247
+ Py_INCREF(o);
248
+ return o;
249
+ }
250
+
251
+ static inline PyObject* Py_XNewRef(PyObject* o)
252
+ {
253
+ Py_XINCREF(o);
254
+ return o;
255
+ }
256
+
257
+ #endif /* PY_VERSION_HEX < 0x030a0000 */
258
+
259
+ #if PY_VERSION_HEX < 0x030d0000
260
+ #define Py_BEGIN_CRITICAL_SECTION(value) { (void)(value);
261
+ #define Py_END_CRITICAL_SECTION() }
262
+ #define Py_EXIT_CRITICAL_SECTION() ((void)0)
263
+
264
+ #define Py_BEGIN_CRITICAL_SECTION2(value1, value2) { (void)(value1); (void)(value2);
265
+ #define Py_END_CRITICAL_SECTION2() }
266
+ #define Py_EXIT_CRITICAL_SECTION2() ((void)0)
267
+
268
+ #define PyObjC_ATOMIC
269
+
270
+ #else
271
+
272
+ #ifdef Py_GIL_DISABLED
273
+ #define Py_EXIT_CRITICAL_SECTION() PyCriticalSection_End(&_py_cs)
274
+ #define Py_EXIT_CRITICAL_SECTION2() PyCriticalSection2_End(&_py_cs2)
275
+ #define PyObjC_ATOMIC _Atomic
276
+ #else
277
+ #define Py_EXIT_CRITICAL_SECTION() ((void)0)
278
+ #define Py_EXIT_CRITICAL_SECTION2() ((void)0)
279
+ #define PyObjC_ATOMIC
280
+ #endif
281
+
282
+ #endif
283
+
284
+ #if PY_VERSION_HEX < 0x030d0000
285
+ static inline int PyDict_GetItemRef(PyObject *p, PyObject *key, PyObject * _Nonnull* _Nullable result)
286
+ {
287
+ *result = PyDict_GetItemWithError(p, key);
288
+ if (*result == NULL) {
289
+ if (PyErr_Occurred()) {
290
+ return -1;
291
+ } else {
292
+ return 0;
293
+ }
294
+ } else {
295
+ Py_INCREF(*result);
296
+ return 1;
297
+ }
298
+ }
299
+
300
+ static inline PyObject* _Nullable PyList_GetItemRef(PyObject* l, Py_ssize_t i)
301
+ {
302
+ PyObject* result = PyList_GetItem(l, i);
303
+ Py_XINCREF(result);
304
+ return result;
305
+ }
306
+ #endif
307
+
308
+ #if PY_VERSION_HEX < 0x030c0000
309
+ static inline PyObject* PyType_GetDict(PyTypeObject* type)
310
+ {
311
+ PyObject* result = type->tp_dict;
312
+ Py_INCREF(result);
313
+ return result;
314
+ }
315
+ #endif
316
+
242
317
 
243
318
  NS_ASSUME_NONNULL_END
244
319
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobjc-framework-ExtensionKit
3
- Version: 10.1
3
+ Version: 11.0
4
4
  Summary: Wrappers for the framework ExtensionKit on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -18,20 +18,20 @@ Classifier: Operating System :: MacOS :: MacOS X
18
18
  Classifier: Programming Language :: Python
19
19
  Classifier: Programming Language :: Python :: 3
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Programming Language :: Python :: 3.8
22
21
  Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
28
28
  Classifier: Programming Language :: Objective C
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Classifier: Topic :: Software Development :: User Interfaces
31
- Requires-Python: >=3.8
31
+ Requires-Python: >=3.9
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
- Requires-Dist: pyobjc-core>=10.1
34
- Requires-Dist: pyobjc-framework-Cocoa>=10.1
33
+ Requires-Dist: pyobjc-core>=11.0
34
+ Requires-Dist: pyobjc-framework-Cocoa>=11.0
35
35
 
36
36
 
37
37
  Wrappers for the "ExtensionKit" framework on macOS.
@@ -0,0 +1,179 @@
1
+ // GENERATED FILE DO NOT EDIT
2
+ //
3
+ // This file was generated by objective.metadata
4
+ // Last update: Sat May 18 09:28:56 2024
5
+ {
6
+ "arch": "arm64",
7
+ "definitions": {
8
+ "aliases": {},
9
+ "called_definitions": {},
10
+ "cftypes": {},
11
+ "classes": {
12
+ "EXAppExtensionBrowserViewController": {
13
+ "categories": [],
14
+ "methods": [],
15
+ "name": "EXAppExtensionBrowserViewController",
16
+ "properties": [],
17
+ "protocols": [],
18
+ "super": "NSViewController"
19
+ },
20
+ "EXHostViewController": {
21
+ "categories": [],
22
+ "methods": [
23
+ {
24
+ "args": [
25
+ {
26
+ "type_modifier": "o",
27
+ "typestr": "^@",
28
+ "typestr_special": false
29
+ }
30
+ ],
31
+ "class_method": false,
32
+ "retval": {
33
+ "typestr": "@",
34
+ "typestr_special": false
35
+ },
36
+ "selector": "makeXPCConnectionWithError:",
37
+ "visibility": "public"
38
+ },
39
+ {
40
+ "args": [],
41
+ "class_method": false,
42
+ "retval": {
43
+ "typestr": "@",
44
+ "typestr_special": false
45
+ },
46
+ "selector": "delegate",
47
+ "visibility": "public"
48
+ },
49
+ {
50
+ "args": [
51
+ {
52
+ "typestr": "@",
53
+ "typestr_special": false
54
+ }
55
+ ],
56
+ "class_method": false,
57
+ "retval": {
58
+ "typestr": "v",
59
+ "typestr_special": false
60
+ },
61
+ "selector": "setDelegate:",
62
+ "visibility": "public"
63
+ },
64
+ {
65
+ "args": [],
66
+ "class_method": false,
67
+ "retval": {
68
+ "typestr": "@",
69
+ "typestr_special": false
70
+ },
71
+ "selector": "placeholderView",
72
+ "visibility": "public"
73
+ },
74
+ {
75
+ "args": [
76
+ {
77
+ "typestr": "@",
78
+ "typestr_special": false
79
+ }
80
+ ],
81
+ "class_method": false,
82
+ "retval": {
83
+ "typestr": "v",
84
+ "typestr_special": false
85
+ },
86
+ "selector": "setPlaceholderView:",
87
+ "visibility": "public"
88
+ }
89
+ ],
90
+ "name": "EXHostViewController",
91
+ "properties": [
92
+ {
93
+ "attributes": [
94
+ "nonatomic",
95
+ "weak"
96
+ ],
97
+ "name": "delegate",
98
+ "typestr": "@",
99
+ "typestr_special": false
100
+ },
101
+ {
102
+ "attributes": [
103
+ "nonatomic",
104
+ "strong"
105
+ ],
106
+ "name": "placeholderView",
107
+ "typestr": "@",
108
+ "typestr_special": false
109
+ }
110
+ ],
111
+ "protocols": [],
112
+ "super": "NSViewController"
113
+ }
114
+ },
115
+ "enum": {},
116
+ "enum_type": {},
117
+ "expressions": {},
118
+ "externs": {},
119
+ "formal_protocols": {
120
+ "EXHostViewControllerDelegate": {
121
+ "implements": [
122
+ "NSObject"
123
+ ],
124
+ "methods": [
125
+ {
126
+ "args": [
127
+ {
128
+ "typestr": "@",
129
+ "typestr_special": false
130
+ }
131
+ ],
132
+ "class_method": false,
133
+ "required": false,
134
+ "retval": {
135
+ "typestr": "v",
136
+ "typestr_special": false
137
+ },
138
+ "selector": "hostViewControllerDidActivate:",
139
+ "visibility": "public"
140
+ },
141
+ {
142
+ "args": [
143
+ {
144
+ "typestr": "@",
145
+ "typestr_special": false
146
+ },
147
+ {
148
+ "typestr": "@",
149
+ "typestr_special": false
150
+ }
151
+ ],
152
+ "class_method": false,
153
+ "required": false,
154
+ "retval": {
155
+ "typestr": "v",
156
+ "typestr_special": false
157
+ },
158
+ "selector": "hostViewControllerWillDeactivate:error:",
159
+ "visibility": "public"
160
+ }
161
+ ],
162
+ "properties": []
163
+ }
164
+ },
165
+ "func_macros": {},
166
+ "functions": {},
167
+ "informal_protocols": {},
168
+ "literals": {},
169
+ "structs": {},
170
+ "typedefs": {}
171
+ },
172
+ "framework": "ExtensionKit",
173
+ "headers": [
174
+ "EXAppExtensionBrowserViewController.h",
175
+ "EXHostViewController.h"
176
+ ],
177
+ "release": "10.16",
178
+ "sdk": "/Users/ronald/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk"
179
+ }
@@ -1,7 +1,7 @@
1
1
  // GENERATED FILE DO NOT EDIT
2
2
  //
3
3
  // This file was generated by objective.metadata
4
- // Last update: Sat Jul 1 14:05:03 2023
4
+ // Last update: Tue Jun 11 10:10:47 2024
5
5
  {
6
6
  "arch": "arm64",
7
7
  "definitions": {
@@ -175,5 +175,5 @@
175
175
  "EXHostViewController.h"
176
176
  ],
177
177
  "release": "10.16",
178
- "sdk": "/Users/ronald/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk"
178
+ "sdk": "/Users/ronald/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk"
179
179
  }
@@ -0,0 +1,179 @@
1
+ // GENERATED FILE DO NOT EDIT
2
+ //
3
+ // This file was generated by objective.metadata
4
+ // Last update: Sat May 18 09:28:54 2024
5
+ {
6
+ "arch": "x86_64",
7
+ "definitions": {
8
+ "aliases": {},
9
+ "called_definitions": {},
10
+ "cftypes": {},
11
+ "classes": {
12
+ "EXAppExtensionBrowserViewController": {
13
+ "categories": [],
14
+ "methods": [],
15
+ "name": "EXAppExtensionBrowserViewController",
16
+ "properties": [],
17
+ "protocols": [],
18
+ "super": "NSViewController"
19
+ },
20
+ "EXHostViewController": {
21
+ "categories": [],
22
+ "methods": [
23
+ {
24
+ "args": [
25
+ {
26
+ "type_modifier": "o",
27
+ "typestr": "^@",
28
+ "typestr_special": false
29
+ }
30
+ ],
31
+ "class_method": false,
32
+ "retval": {
33
+ "typestr": "@",
34
+ "typestr_special": false
35
+ },
36
+ "selector": "makeXPCConnectionWithError:",
37
+ "visibility": "public"
38
+ },
39
+ {
40
+ "args": [],
41
+ "class_method": false,
42
+ "retval": {
43
+ "typestr": "@",
44
+ "typestr_special": false
45
+ },
46
+ "selector": "delegate",
47
+ "visibility": "public"
48
+ },
49
+ {
50
+ "args": [
51
+ {
52
+ "typestr": "@",
53
+ "typestr_special": false
54
+ }
55
+ ],
56
+ "class_method": false,
57
+ "retval": {
58
+ "typestr": "v",
59
+ "typestr_special": false
60
+ },
61
+ "selector": "setDelegate:",
62
+ "visibility": "public"
63
+ },
64
+ {
65
+ "args": [],
66
+ "class_method": false,
67
+ "retval": {
68
+ "typestr": "@",
69
+ "typestr_special": false
70
+ },
71
+ "selector": "placeholderView",
72
+ "visibility": "public"
73
+ },
74
+ {
75
+ "args": [
76
+ {
77
+ "typestr": "@",
78
+ "typestr_special": false
79
+ }
80
+ ],
81
+ "class_method": false,
82
+ "retval": {
83
+ "typestr": "v",
84
+ "typestr_special": false
85
+ },
86
+ "selector": "setPlaceholderView:",
87
+ "visibility": "public"
88
+ }
89
+ ],
90
+ "name": "EXHostViewController",
91
+ "properties": [
92
+ {
93
+ "attributes": [
94
+ "nonatomic",
95
+ "weak"
96
+ ],
97
+ "name": "delegate",
98
+ "typestr": "@",
99
+ "typestr_special": false
100
+ },
101
+ {
102
+ "attributes": [
103
+ "nonatomic",
104
+ "strong"
105
+ ],
106
+ "name": "placeholderView",
107
+ "typestr": "@",
108
+ "typestr_special": false
109
+ }
110
+ ],
111
+ "protocols": [],
112
+ "super": "NSViewController"
113
+ }
114
+ },
115
+ "enum": {},
116
+ "enum_type": {},
117
+ "expressions": {},
118
+ "externs": {},
119
+ "formal_protocols": {
120
+ "EXHostViewControllerDelegate": {
121
+ "implements": [
122
+ "NSObject"
123
+ ],
124
+ "methods": [
125
+ {
126
+ "args": [
127
+ {
128
+ "typestr": "@",
129
+ "typestr_special": false
130
+ }
131
+ ],
132
+ "class_method": false,
133
+ "required": false,
134
+ "retval": {
135
+ "typestr": "v",
136
+ "typestr_special": false
137
+ },
138
+ "selector": "hostViewControllerDidActivate:",
139
+ "visibility": "public"
140
+ },
141
+ {
142
+ "args": [
143
+ {
144
+ "typestr": "@",
145
+ "typestr_special": false
146
+ },
147
+ {
148
+ "typestr": "@",
149
+ "typestr_special": false
150
+ }
151
+ ],
152
+ "class_method": false,
153
+ "required": false,
154
+ "retval": {
155
+ "typestr": "v",
156
+ "typestr_special": false
157
+ },
158
+ "selector": "hostViewControllerWillDeactivate:error:",
159
+ "visibility": "public"
160
+ }
161
+ ],
162
+ "properties": []
163
+ }
164
+ },
165
+ "func_macros": {},
166
+ "functions": {},
167
+ "informal_protocols": {},
168
+ "literals": {},
169
+ "structs": {},
170
+ "typedefs": {}
171
+ },
172
+ "framework": "ExtensionKit",
173
+ "headers": [
174
+ "EXAppExtensionBrowserViewController.h",
175
+ "EXHostViewController.h"
176
+ ],
177
+ "release": "10.16",
178
+ "sdk": "/Users/ronald/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk"
179
+ }
@@ -1,7 +1,7 @@
1
1
  // GENERATED FILE DO NOT EDIT
2
2
  //
3
3
  // This file was generated by objective.metadata
4
- // Last update: Sat Jul 1 14:05:00 2023
4
+ // Last update: Tue Jun 11 10:10:43 2024
5
5
  {
6
6
  "arch": "x86_64",
7
7
  "definitions": {
@@ -175,5 +175,5 @@
175
175
  "EXHostViewController.h"
176
176
  ],
177
177
  "release": "10.16",
178
- "sdk": "/Users/ronald/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk"
178
+ "sdk": "/Users/ronald/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk"
179
179
  }
@@ -20,13 +20,15 @@ import shutil
20
20
  import subprocess
21
21
  import sys
22
22
  import tempfile
23
+ import textwrap
23
24
  import time
24
25
  import unittest
26
+ from fnmatch import fnmatch
25
27
  from sysconfig import get_config_var, get_config_vars
26
28
  from setuptools import Command
27
29
  from setuptools import Extension as _Extension
28
30
  from setuptools import setup as _setup
29
- from setuptools.command import build_ext, build_py, develop, egg_info, install_lib, test
31
+ from setuptools.command import build_ext, build_py, develop, egg_info, install_lib
30
32
 
31
33
  from distutils import log
32
34
  from distutils.errors import DistutilsError, DistutilsPlatformError
@@ -59,6 +61,7 @@ REPO_NAME = "pyobjc"
59
61
  class oc_egg_info(egg_info.egg_info):
60
62
  def run(self):
61
63
  egg_info.egg_info.run(self)
64
+ self.write_build_info()
62
65
 
63
66
  path = os.path.join(self.egg_info, "PKG-INFO")
64
67
  with open(path) as fp:
@@ -83,19 +86,54 @@ class oc_egg_info(egg_info.egg_info):
83
86
  fp.write(middle)
84
87
  fp.write(last)
85
88
 
89
+ def write_build_info(self):
90
+ macos_version = subprocess.check_output(
91
+ ["sw_vers", "-productversion"], text=True
92
+ ).strip()
93
+ macos_build = subprocess.check_output(
94
+ ["sw_vers", "-buildversion"], text=True
95
+ ).strip()
96
+ clang_version = (
97
+ subprocess.check_output(["clang", "--version"], text=True)
98
+ .splitlines()[0]
99
+ .strip()
100
+ )
101
+
102
+ sdk_root = get_sdk()
103
+ if sdk_root is None:
104
+ sdk_root = subprocess.check_output(
105
+ ["xcrun", "-sdk", "macosx", "--show-sdk-path"], text=True
106
+ ).strip()
107
+ sdk_info = os.path.join(sdk_root, "SDKSettings.plist")
108
+ if os.path.exists(sdk_info):
109
+ pl = plistlib.load(open(sdk_info, "rb"))
110
+ sdk_version = pl["DisplayName"]
111
+ else:
112
+ sdk_version = os.path.basename(sdk_root)
113
+
114
+ build_info = textwrap.dedent(
115
+ f"""\
116
+ macOS {macos_version} ({macos_build})
117
+ {clang_version}
118
+ SDK: {sdk_version}
119
+ """
120
+ )
121
+
122
+ self.write_file(
123
+ "pyobjc-build-info.txt",
124
+ os.path.join(self.egg_info, "pyobjc-build-info.txt"),
125
+ build_info,
126
+ )
127
+
86
128
 
87
- class oc_test(test.test):
129
+ class oc_test(Command):
88
130
  description = "run test suite"
89
- user_options = test.test.user_options + [
90
- ("verbosity=", None, "print what tests are run")
91
- ]
131
+ user_options = [("verbosity=", None, "print what tests are run")]
92
132
 
93
133
  def initialize_options(self):
94
- test.test.initialize_options(self)
95
134
  self.verbosity = "1"
96
135
 
97
136
  def finalize_options(self):
98
- test.test.finalize_options(self)
99
137
  if isinstance(self.verbosity, str):
100
138
  self.verbosity = int(self.verbosity)
101
139
 
@@ -154,18 +192,13 @@ class oc_test(test.test):
154
192
  self.cleanup_environment()
155
193
  self.add_project_to_sys_path()
156
194
 
157
- from pkg_resources import EntryPoint
158
-
159
- loader_ep = EntryPoint.parse("x=" + self.test_loader)
160
- loader_class = loader_ep.resolve()
161
-
162
195
  import warnings
163
196
 
164
197
  warnings.simplefilter("error")
165
198
 
166
199
  try:
167
200
  time_before = time.time()
168
- suite = loader_class().loadTestsFromName(self.distribution.test_suite)
201
+ suite = makeTestSuite()
169
202
 
170
203
  if self.verbose and self.verbosity < 3:
171
204
  runner = unittest.TextTestRunner(verbosity=3)
@@ -208,12 +241,12 @@ Operating System :: MacOS :: MacOS X
208
241
  Programming Language :: Python
209
242
  Programming Language :: Python :: 3
210
243
  Programming Language :: Python :: 3 :: Only
211
- Programming Language :: Python :: 3.8
212
244
  Programming Language :: Python :: 3.9
213
245
  Programming Language :: Python :: 3.10
214
246
  Programming Language :: Python :: 3.11
215
247
  Programming Language :: Python :: 3.12
216
248
  Programming Language :: Python :: 3.13
249
+ Programming Language :: Python :: 3.14
217
250
  Programming Language :: Python :: Implementation :: CPython
218
251
  Programming Language :: Objective C
219
252
  Topic :: Software Development :: Libraries :: Python Modules
@@ -511,21 +544,15 @@ def Extension(*args, **kwds):
511
544
  % (tuple(map(int, os_level.split(".")[:2])))
512
545
  )
513
546
 
514
- # XCode 15 has a bug w.r.t. weak linking for older macOS versions,
515
- # fall back to older linker when using that compiler.
516
- # XXX: This should be in _fixup_compiler but doesn't work there...
517
- lines = subprocess.check_output(["xcodebuild", "-version"], text=True).splitlines()
518
- if lines[0].startswith("Xcode"):
519
- xcode_vers = int(lines[0].split()[-1].split(".")[0])
520
- if xcode_vers >= 15:
521
- ldflags.append("-Wl,-ld_classic")
522
-
523
547
  if os_level == "10.4":
524
548
  cflags.append("-DNO_OBJC2_RUNTIME")
525
549
 
526
550
  if "-Werror" not in cflags:
527
551
  cflags.append("-Werror")
528
552
 
553
+ if get_config_var("Py_GIL_DISABLED"):
554
+ cflags.append("-DPyObjC_GIL_DISABLED")
555
+
529
556
  if "extra_compile_args" in kwds:
530
557
  kwds["extra_compile_args"] = kwds["extra_compile_args"] + cflags
531
558
  else:
@@ -543,8 +570,15 @@ def _sort_key(version):
543
570
  return tuple(int(x) for x in version.split("."))
544
571
 
545
572
 
546
- def setup(min_os_level=None, max_os_level=None, cmdclass=None, **kwds):
573
+ def setup(
574
+ min_os_level=None,
575
+ max_os_level=None,
576
+ cmdclass=None,
577
+ options={}, # noqa: M511, B006
578
+ **kwds,
579
+ ):
547
580
  k = kwds.copy()
581
+ options = options.copy()
548
582
 
549
583
  os_level = get_sdk_level()
550
584
  if os_level is None:
@@ -616,7 +650,7 @@ def setup(min_os_level=None, max_os_level=None, cmdclass=None, **kwds):
616
650
 
617
651
  if "ext_modules" not in k:
618
652
  # No extension modules, can build universal wheel
619
- k["options"] = {"bdist_wheel": {"universal": 1}}
653
+ options.update({"bdist_wheel": {"universal": 1}})
620
654
 
621
655
  plat_name = "MacOS X"
622
656
  plat_versions = []
@@ -658,6 +692,12 @@ def setup(min_os_level=None, max_os_level=None, cmdclass=None, **kwds):
658
692
  )
659
693
  k["long_description_content_type"] = "text/x-rst; charset=UTF-8"
660
694
 
695
+ if "bdist_wheel" in options:
696
+ # Python 3.13 does not support the limited ABI for C extensions
697
+ # when using a free threaded build.
698
+ if get_config_var("Py_GIL_DISABLED"):
699
+ del options["bdist_wheel"]
700
+
661
701
  _setup(
662
702
  cmdclass=cmdclass,
663
703
  author="Ronald Oussoren",
@@ -667,11 +707,65 @@ def setup(min_os_level=None, max_os_level=None, cmdclass=None, **kwds):
667
707
  package_dir={"": "Lib", "PyObjCTest": "PyObjCTest"},
668
708
  dependency_links=[],
669
709
  package_data={"": ["*.bridgesupport"]},
670
- test_suite="PyObjCTest",
671
710
  zip_safe=False,
672
711
  license="MIT License",
673
712
  classifiers=CLASSIFIERS,
674
- python_requires=">=3.8",
713
+ python_requires=">=3.9",
675
714
  keywords=["PyObjC"] + [p for p in k["packages"] if p not in ("PyObjCTools",)],
715
+ options=options,
676
716
  **k,
677
717
  )
718
+
719
+
720
+ def recursiveGlob(root, pathPattern):
721
+ """
722
+ Recursively look for files matching 'pathPattern'. Return a list
723
+ of matching files/directories.
724
+ """
725
+ result = []
726
+
727
+ for rootpath, _dirnames, filenames in os.walk(root):
728
+ for fn in filenames:
729
+ if fnmatch(fn, pathPattern):
730
+ result.append(os.path.join(rootpath, fn))
731
+ return result
732
+
733
+
734
+ def importExternalTestCases(pathPattern="test_*.py", root=".", package=None):
735
+ """
736
+ Import all unittests in the PyObjC tree starting at 'root'
737
+ """
738
+
739
+ testFiles = recursiveGlob(root, pathPattern)
740
+ testModules = [x[len(root) + 1 : -3].replace("/", ".") for x in testFiles]
741
+ if package is not None:
742
+ testModules = [(package + "." + m) for m in testModules]
743
+
744
+ suites = []
745
+
746
+ for modName in testModules:
747
+ try:
748
+ module = __import__(modName)
749
+ except ImportError as msg:
750
+ print(f"SKIP {modName}: {msg}")
751
+ continue
752
+
753
+ if "." in modName:
754
+ for elem in modName.split(".")[1:]:
755
+ module = getattr(module, elem)
756
+
757
+ s = unittest.defaultTestLoader.loadTestsFromModule(module)
758
+ suites.append(s)
759
+
760
+ return unittest.TestSuite(suites)
761
+
762
+
763
+ gTopdir = os.path.dirname(__file__)
764
+
765
+
766
+ def makeTestSuite():
767
+ plain_suite = importExternalTestCases(
768
+ "test_*.py", os.path.join(gTopdir, "PyObjCTest"), package="PyObjCTest"
769
+ )
770
+
771
+ return plain_suite
@@ -15,7 +15,7 @@ sys.path.insert(0, os.path.dirname(__file__))
15
15
 
16
16
  from pyobjc_setup import Extension, setup # noqa: E402
17
17
 
18
- VERSION = "10.1"
18
+ VERSION = "11.0"
19
19
 
20
20
  setup(
21
21
  name="pyobjc-framework-ExtensionKit",
@@ -27,7 +27,6 @@ setup(
27
27
  "ExtensionKit._ExtensionKit",
28
28
  ["Modules/_ExtensionKit.m"],
29
29
  extra_link_args=["-framework", "ExtensionKit"],
30
- py_limited_api=True,
31
30
  depends=[
32
31
  os.path.join("Modules", fn)
33
32
  for fn in os.listdir("Modules")
@@ -41,5 +40,4 @@ setup(
41
40
  "pyobjc-framework-Cocoa>=" + VERSION,
42
41
  ],
43
42
  long_description=__doc__,
44
- options={"bdist_wheel": {"py_limited_api": "cp36"}},
45
43
  )
@@ -1,2 +0,0 @@
1
- pyobjc-core>=10.1
2
- pyobjc-framework-Cocoa>=10.1
@@ -1,36 +0,0 @@
1
- #define Py_LIMITED_API 0x03060000
2
- #define PY_SSIZE_T_CLEAN
3
- #include "Python.h"
4
- #include "pyobjc-api.h"
5
-
6
- #import <ExtensionKit/ExtensionKit.h>
7
- #import <Foundation/Foundation.h>
8
-
9
- /* We include the source code here instead of
10
- * using the linker due to limitations in pyobjc-api.h
11
- */
12
- #include "_ExtensionKit_protocols.m"
13
-
14
- static PyMethodDef mod_methods[] = {
15
- {0, 0, 0, 0} /* sentinel */
16
- };
17
-
18
- /* Python glue */
19
- static struct PyModuleDef mod_module = {
20
- PyModuleDef_HEAD_INIT, "_ExtensionKit", NULL, 0, mod_methods, NULL, NULL, NULL, NULL};
21
-
22
- PyObject* PyInit__ExtensionKit(void);
23
-
24
- PyObject* __attribute__((__visibility__("default"))) PyInit__ExtensionKit(void)
25
- {
26
- PyObject* m;
27
- m = PyModule_Create(&mod_module);
28
- if (!m) {
29
- return NULL;
30
- }
31
-
32
- if (PyObjC_ImportAPI(m) == -1)
33
- return NULL;
34
-
35
- return m;
36
- }