pyobjc-framework-Automator 10.0__tar.gz → 10.2__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 (63) hide show
  1. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/LICENSE.txt +1 -1
  2. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/Automator/__init__.py +5 -2
  3. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/pyobjc_framework_Automator.egg-info/PKG-INFO +4 -3
  4. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/pyobjc_framework_Automator.egg-info/SOURCES.txt +4 -0
  5. pyobjc-framework-Automator-10.2/Lib/pyobjc_framework_Automator.egg-info/requires.txt +2 -0
  6. pyobjc-framework-Automator-10.2/Modules/_Automator.m +35 -0
  7. pyobjc-framework-Automator-10.2/Modules/_Automator_protocols.m +8 -0
  8. pyobjc-framework-Automator-10.2/Modules/pyobjc-api.h +214 -0
  9. pyobjc-framework-Automator-10.2/Modules/pyobjc-compat.h +245 -0
  10. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PKG-INFO +4 -3
  11. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/pyobjc_setup.py +5 -4
  12. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/setup.py +16 -2
  13. pyobjc-framework-Automator-10.0/Lib/pyobjc_framework_Automator.egg-info/requires.txt +0 -2
  14. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/Controller.py +0 -0
  15. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/English.lproj/InfoPlist.strings +0 -0
  16. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/English.lproj/MainMenu.nib/designable.nib +0 -0
  17. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/English.lproj/MainMenu.nib/keyedobjects.nib +0 -0
  18. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/ReadMe.txt +0 -0
  19. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/main.py +0 -0
  20. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/setup.py +0 -0
  21. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/summary.txt +0 -0
  22. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/workflows/Hello World.workflow/Contents/QuickLook/Preview.pdf +0 -0
  23. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/workflows/Hello World.workflow/Contents/document.wflow +0 -0
  24. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/workflows/Run Automator.workflow/Contents/QuickLook/Preview.pdf +0 -0
  25. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/workflows/Run Automator.workflow/Contents/document.wflow +0 -0
  26. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/workflows/Small Step.workflow/Contents/QuickLook/Preview.pdf +0 -0
  27. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/AutoSample/workflows/Small Step.workflow/Contents/document.wflow +0 -0
  28. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/Get Buddy Info/English.lproj/InfoPlist.strings +0 -0
  29. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/Get Buddy Info/GetBuddyInfo.py +0 -0
  30. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/Get Buddy Info/Info.plist +0 -0
  31. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/Get Buddy Info/setup.py +0 -0
  32. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Examples/Get Buddy Info/summary.txt +0 -0
  33. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/Automator/_metadata.py +0 -0
  34. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/pyobjc_framework_Automator.egg-info/dependency_links.txt +0 -0
  35. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/pyobjc_framework_Automator.egg-info/not-zip-safe +0 -0
  36. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/Lib/pyobjc_framework_Automator.egg-info/top_level.txt +0 -0
  37. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/MANIFEST.in +0 -0
  38. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/__init__.py +0 -0
  39. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_amaction.py +0 -0
  40. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_ambundleaction.py +0 -0
  41. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_amshellscriptaction.py +0 -0
  42. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_amworkflow.py +0 -0
  43. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_amworkflowcontroller.py +0 -0
  44. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_amworkflowview.py +0 -0
  45. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_amworkspace.py +0 -0
  46. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_automator.py +0 -0
  47. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/PyObjCTest/test_automatorerrors.py +0 -0
  48. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/README.txt +0 -0
  49. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/Automator.fwinfo +0 -0
  50. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/metadata.ini +0 -0
  51. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/arm64-12.0.fwinfo +0 -0
  52. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/arm64-12.3.fwinfo +0 -0
  53. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/arm64-14.0.fwinfo +0 -0
  54. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-10.10.fwinfo +0 -0
  55. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-10.16.fwinfo +0 -0
  56. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-10.6.fwinfo +0 -0
  57. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-10.7.fwinfo +0 -0
  58. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-10.8.fwinfo +0 -0
  59. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-12.0.fwinfo +0 -0
  60. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-12.3.fwinfo +0 -0
  61. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/metadata/raw/x86_64-14.0.fwinfo +0 -0
  62. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/pyproject.toml +0 -0
  63. {pyobjc-framework-Automator-10.0 → pyobjc-framework-Automator-10.2}/setup.cfg +0 -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
 
@@ -11,7 +11,7 @@ def _setup():
11
11
 
12
12
  import AppKit
13
13
  import objc
14
- from . import _metadata
14
+ from . import _metadata, _Automator
15
15
 
16
16
  dir_func, getattr_func = objc.createFrameworkDirAndGetattr(
17
17
  name="Automator",
@@ -21,7 +21,10 @@ def _setup():
21
21
  ),
22
22
  globals_dict=globals(),
23
23
  inline_list=None,
24
- parents=(AppKit,),
24
+ parents=(
25
+ _Automator,
26
+ AppKit,
27
+ ),
25
28
  metadict=_metadata.__dict__,
26
29
  )
27
30
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobjc-framework-Automator
3
- Version: 10.0
3
+ Version: 10.2
4
4
  Summary: Wrappers for the framework Automator on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -23,6 +23,7 @@ Classifier: Programming Language :: Python :: 3.9
23
23
  Classifier: Programming Language :: Python :: 3.10
24
24
  Classifier: Programming Language :: Python :: 3.11
25
25
  Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
26
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
28
  Classifier: Programming Language :: Objective C
28
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -30,8 +31,8 @@ Classifier: Topic :: Software Development :: User Interfaces
30
31
  Requires-Python: >=3.8
31
32
  Description-Content-Type: text/x-rst; charset=UTF-8
32
33
  License-File: LICENSE.txt
33
- Requires-Dist: pyobjc-core>=10.0
34
- Requires-Dist: pyobjc-framework-Cocoa>=10.0
34
+ Requires-Dist: pyobjc-core>=10.2
35
+ Requires-Dist: pyobjc-framework-Cocoa>=10.2
35
36
  Project-URL: Documentation, https://pyobjc.readthedocs.io/en/latest/
36
37
  Project-URL: Issue tracker, https://github.com/ronaldoussoren/pyobjc/issues
37
38
  Project-URL: Repository, https://github.com/ronaldoussoren/pyobjc
@@ -31,6 +31,10 @@ Lib/pyobjc_framework_Automator.egg-info/dependency_links.txt
31
31
  Lib/pyobjc_framework_Automator.egg-info/not-zip-safe
32
32
  Lib/pyobjc_framework_Automator.egg-info/requires.txt
33
33
  Lib/pyobjc_framework_Automator.egg-info/top_level.txt
34
+ Modules/_Automator.m
35
+ Modules/_Automator_protocols.m
36
+ Modules/pyobjc-api.h
37
+ Modules/pyobjc-compat.h
34
38
  PyObjCTest/__init__.py
35
39
  PyObjCTest/test_amaction.py
36
40
  PyObjCTest/test_ambundleaction.py
@@ -0,0 +1,2 @@
1
+ pyobjc-core>=10.2
2
+ pyobjc-framework-Cocoa>=10.2
@@ -0,0 +1,35 @@
1
+ #define Py_LIMITED_API 0x03060000
2
+ #define PY_SSIZE_T_CLEAN
3
+ #include "Python.h"
4
+ #include "pyobjc-api.h"
5
+
6
+ #import <Automator/Automator.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 "_Automator_protocols.m"
12
+
13
+ static PyMethodDef mod_methods[] = {
14
+ {0, 0, 0, 0} /* sentinel */
15
+ };
16
+
17
+ /* Python glue */
18
+ static struct PyModuleDef mod_module = {
19
+ PyModuleDef_HEAD_INIT, "_Automator", NULL, 0, mod_methods, NULL, NULL, NULL, NULL};
20
+
21
+ PyObject* PyInit__Automator(void);
22
+
23
+ PyObject* __attribute__((__visibility__("default"))) PyInit__Automator(void)
24
+ {
25
+ PyObject* m;
26
+ m = PyModule_Create(&mod_module);
27
+ if (!m) {
28
+ return NULL;
29
+ }
30
+
31
+ if (PyObjC_ImportAPI(m) == -1)
32
+ return NULL;
33
+
34
+ return m;
35
+ }
@@ -0,0 +1,8 @@
1
+ static void __attribute__((__used__)) use_protocols(void)
2
+ {
3
+ PyObject* p __attribute__((__unused__));
4
+ #if PyObjC_BUILD_RELEASE >= 1013
5
+ p = PyObjC_IdToPython(@protocol(AMWorkflowControllerDelegate));
6
+ Py_XDECREF(p);
7
+ #endif
8
+ }
@@ -0,0 +1,214 @@
1
+ #ifndef PyObjC_API_H
2
+ #define PyObjC_API_H
3
+
4
+ /*
5
+ * Use this in helper modules for the objc package, and in wrappers
6
+ * for functions that deal with objective-C objects/classes
7
+ *
8
+ * This header defines some utility wrappers for importing and using
9
+ * the core bridge.
10
+ *
11
+ * This is the *only* header file that should be used to access
12
+ * functionality in the core bridge.
13
+ *
14
+ * WARNING: this file is not part of the public interface of PyObjC and
15
+ * might change or be removed without warning or regard for backward
16
+ * compatibility.
17
+ */
18
+
19
+ #include <objc/objc.h>
20
+
21
+ #import <Foundation/Foundation.h>
22
+
23
+ #include "pyobjc-compat.h"
24
+
25
+ #ifdef Py_LIMITED_API
26
+ /*
27
+ * Make sure PyObjC framework wrappers can build using the limited API
28
+ */
29
+ typedef void Py_buffer;
30
+ #endif
31
+
32
+ #include <objc/objc-runtime.h>
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ /* Current API version, increase whenever:
37
+ * - Semantics of current functions change
38
+ * - Functions are removed
39
+ *
40
+ * Do not increase when adding a new function, the struct_len field
41
+ * can be used for detecting if a function has been added.
42
+ */
43
+ #ifndef PYOBJC_API_VERSION
44
+ #define PYOBJC_API_VERSION 25
45
+ #endif
46
+
47
+ #define PYOBJC_API_NAME "__C_API__"
48
+
49
+ #ifndef PyObjC_EXPECTED_STRUCT_SIZE
50
+ #define PyObjC_EXPECTED_STRUCT_SIZE (sizeof(struct pyobjc_api))
51
+ #endif
52
+
53
+ /*
54
+ * Only add items to the end of this list!
55
+ */
56
+ typedef int(RegisterMethodMappingFunctionType)(
57
+ Class, SEL,
58
+ PyObject* _Nullable (*_Nonnull)(PyObject* _Nonnull, PyObject* _Nonnull,
59
+ PyObject* _Nonnull const* _Nonnull, size_t),
60
+ IMP _Nullable (*_Nonnull)(PyObject* _Nonnull, PyObject* _Nonnull));
61
+
62
+ struct pyobjc_api {
63
+ int api_version; /* API version */
64
+ size_t struct_len; /* Length of this struct */
65
+ RegisterMethodMappingFunctionType* register_method_mapping;
66
+ id _Nullable (*_Nonnull obj_get_object)(PyObject* _Nonnull);
67
+ Class _Nullable (*_Nonnull cls_get_class)(PyObject* _Nonnull);
68
+ int (*_Nonnull depythonify_python_object)(PyObject* _Nonnull, id _Nullable* _Nonnull);
69
+ PyObject* _Nullable (*_Nonnull id_to_python)(id _Nullable);
70
+ void (*_Nonnull err_objc_to_python)(NSObject* _Nonnull);
71
+ int (*_Nonnull py_to_objc)(const char* _Nonnull, PyObject* _Nonnull, void* _Nonnull);
72
+ PyObject* _Nullable (*_Nonnull objc_to_py)(const char* _Nonnull,
73
+ const void* _Nonnull);
74
+ Py_ssize_t (*_Nonnull sizeof_type)(const char* _Nonnull);
75
+ Class _Nullable (*_Nonnull sel_get_class)(PyObject* _Nonnull sel);
76
+ SEL _Nullable (*_Nonnull sel_get_sel)(PyObject* _Nonnull sel);
77
+ int (*_Nonnull register_pointer_wrapper)(
78
+ const char* _Nonnull, const char* _Nonnull,
79
+ PyObject* _Nullable (*_Nonnull pythonify)(void* _Nonnull),
80
+ int (*_Nonnull depythonify)(PyObject* _Nonnull, void* _Nonnull));
81
+ IMP _Nullable (*_Nonnull unsupported_method_imp)(PyObject* _Nonnull,
82
+ PyObject* _Nonnull);
83
+ PyObject* _Nullable (*_Nonnull unsupported_method_caller)(
84
+ PyObject* _Nonnull, PyObject* _Nonnull, PyObject* _Nonnull const* _Nonnull,
85
+ size_t);
86
+ void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state);
87
+ int (*_Nonnull simplify_sig)(const char* signature, char* buf, size_t buflen);
88
+ void (*_Nonnull free_c_array)(int, Py_buffer*);
89
+ int (*_Nonnull py_to_c_array)(BOOL, BOOL, const char* _Nonnull, PyObject* _Nonnull,
90
+ void* _Nullable* _Nonnull, Py_ssize_t* _Nullable,
91
+ PyObject* _Nonnull* _Nonnull, Py_buffer* _Nonnull);
92
+ PyObject* _Nullable (*_Nonnull c_array_to_py)(const char* _Nonnull,
93
+ const void* _Nonnull, Py_ssize_t);
94
+ PyTypeObject* _Nonnull imp_type;
95
+ IMP _Nullable (*_Nonnull imp_get_imp)(PyObject* _Nonnull);
96
+ SEL _Nullable (*_Nonnull imp_get_sel)(PyObject* _Nonnull);
97
+ PyObject* _Nullable (*_Nonnull newtransient)(id _Nullable objc_object,
98
+ int* _Nonnull cookie);
99
+ void (*_Nonnull releasetransient)(PyObject* _Nonnull proxy, int cookie);
100
+ PyObject* _Nonnull* _Nonnull pyobjc_null;
101
+ int (*_Nonnull dep_c_array_count)(const char* _Nonnull type, Py_ssize_t count,
102
+ BOOL strict, PyObject* _Nonnull value,
103
+ void* _Nonnull datum, BOOL, BOOL);
104
+ PyObject* _Nullable (*_Nonnull varlistnew)(const char* _Nonnull tp,
105
+ void* _Nonnull array);
106
+ int (*_Nonnull pyobjcobject_convert)(PyObject* _Nonnull, void* _Nonnull);
107
+ int (*_Nonnull register_id_alias)(const char* _Nonnull, const char* _Nonnull);
108
+ int (*_Nonnull memview_check)(PyObject* _Nonnull);
109
+ PyObject* _Nullable (*_Nonnull memview_new)(void);
110
+ Py_buffer* _Nullable (*_Nonnull memview_getbuffer)(PyObject* _Nonnull);
111
+ int (*_Nonnull checkargcount)(PyObject* _Nonnull callable, size_t min_args,
112
+ size_t max_args, size_t nargsf);
113
+ int (*_Nonnull checknokwnames)(PyObject* _Nonnull callable,
114
+ PyObject* _Nullable kwnames);
115
+
116
+ PyObject* _Nullable (*_Nonnull createopaquepointertype)(const char*, const char*, const char*);
117
+ };
118
+
119
+ #ifndef PYOBJC_BUILD
120
+
121
+ #ifndef PYOBJC_METHOD_STUB_IMPL
122
+ static struct pyobjc_api* PyObjC_API;
123
+ #endif /* PYOBJC_METHOD_STUB_IMPL */
124
+
125
+ #define PyObjCIMP_Check(obj) PyObject_TypeCheck(obj, PyObjC_API->imp_type)
126
+ #define PyObjCObject_GetObject (PyObjC_API->obj_get_object)
127
+ #define PyObjCClass_GetClass (PyObjC_API->cls_get_class)
128
+ #define PyObjCSelector_GetClass (PyObjC_API->sel_get_class)
129
+ #define PyObjCSelector_GetSelector (PyObjC_API->sel_get_sel)
130
+ #define depythonify_python_object (PyObjC_API->depythonify_python_object)
131
+ #define PyObjC_IdToPython (PyObjC_API->id_to_python)
132
+ #define PyObjCErr_FromObjC (PyObjC_API->err_objc_to_python)
133
+ #define PyObjCErr_ToObjCWithGILState (PyObjC_API->err_python_to_objc_gil)
134
+ #define PyObjC_PythonToObjC (PyObjC_API->py_to_objc)
135
+ #define PyObjC_ObjCToPython (PyObjC_API->objc_to_py)
136
+ #define PyObjC_RegisterMethodMapping (PyObjC_API->register_method_mapping)
137
+ #define PyObjCPointerWrapper_Register (PyObjC_API->register_pointer_wrapper)
138
+ #define PyObjCUnsupportedMethod_IMP (PyObjC_API->unsupported_method_imp)
139
+ #define PyObjCUnsupportedMethod_Caller (PyObjC_API->unsupported_method_caller)
140
+ #define PyObjCRT_SizeOfType (PyObjC_API->sizeof_type)
141
+ #define PyObjC_FreeCArray (PyObjC_API->free_c_array)
142
+ #define PyObjC_PythonToCArray (PyObjC_API->py_to_c_array)
143
+ #define PyObjC_CArrayToPython (PyObjC_API->c_array_to_py)
144
+ #define PyObjCIMP_GetIMP (PyObjC_API->imp_get_imp)
145
+ #define PyObjCIMP_GetSelector (PyObjC_API->imp_get_sel)
146
+ #define PyObjCObject_NewTransient (PyObjC_API->newtransient)
147
+ #define PyObjCObject_ReleaseTransient (PyObjC_API->releasetransient)
148
+ #define PyObjC_NULL (*(PyObjC_API->pyobjc_null))
149
+ #define PyObjC_DepythonifyCArray (PyObjC_API->dep_c_array_count)
150
+ #define PyObjCVarList_New (PyObjC_API->varlistnew)
151
+ #define PyObjCObject_Convert (PyObjC_API->pyobjcobject_convert)
152
+ #define PyObjCPointerWrapper_RegisterID (PyObjC_API->register_id_alias)
153
+ #define PyObjCMemView_Check (PyObjC_API->memview_check)
154
+ #define PyObjCMemView_New (PyObjC_API->memview_new)
155
+ #define PyObjCMemView_GetBuffer (PyObjC_API->memview_getbuffer)
156
+ #define PyObjC_CheckArgCount (PyObjC_API->checkargcount)
157
+ #define PyObjC_CheckNoKwnames (PyObjC_API->checknokwnames)
158
+ #define PyObjCCreateOpaquePointerType (PyObjC_API->createopaquepointertype)
159
+
160
+ typedef void (*PyObjC_Function_Pointer)(void);
161
+ typedef struct PyObjC_function_map {
162
+ const char* name;
163
+ PyObjC_Function_Pointer function;
164
+ } PyObjC_function_map;
165
+
166
+ #ifndef PYOBJC_METHOD_STUB_IMPL
167
+
168
+ static inline PyObject*
169
+ PyObjC_CreateInlineTab(PyObjC_function_map* map)
170
+ {
171
+ return PyCapsule_New(map, "objc.__inline__", NULL);
172
+ }
173
+
174
+ static inline int
175
+ PyObjC_ImportAPI(PyObject* calling_module)
176
+ {
177
+ PyObjC_API = (struct pyobjc_api*)PyCapsule_Import("objc." PYOBJC_API_NAME, 0);
178
+ if (PyObjC_API == NULL) {
179
+ return -1;
180
+ }
181
+ if (PyObjC_API->api_version != PYOBJC_API_VERSION) {
182
+ PyErr_Format(PyExc_RuntimeError,
183
+ "Wrong version of PyObjC C API (got %d, expected %d)",
184
+ (int)PyObjC_API->api_version, (int)PYOBJC_API_VERSION);
185
+ return -1;
186
+ }
187
+
188
+ if (PyObjC_API->struct_len < PyObjC_EXPECTED_STRUCT_SIZE) {
189
+ PyErr_Format(PyExc_RuntimeError,
190
+ "Wrong struct-size of PyObjC C API (got %d, expected %d)",
191
+ (int)PyObjC_API->struct_len, (int)sizeof(struct pyobjc_api));
192
+ return -1;
193
+ }
194
+
195
+ /* Current pyobjc implementation doesn't allow deregistering
196
+ * information, avoid unloading of users of the C-API.
197
+ * (Yes this is ugle, patches to fix this situation are apriciated)
198
+ */
199
+ Py_INCREF(calling_module);
200
+
201
+ return 0;
202
+ }
203
+ #endif /* PYOBJC_METHOD_STUB_IMPL */
204
+
205
+ #else /* PyObjC_BUILD */
206
+
207
+ extern struct pyobjc_api objc_api;
208
+ extern int PyObjCAPI_Register(PyObject* module);
209
+
210
+ #endif /* !PYOBJC_BUILD */
211
+
212
+ NS_ASSUME_NONNULL_END
213
+
214
+ #endif /* PyObjC_API_H */
@@ -0,0 +1,245 @@
1
+ #ifndef PyObjC_COMPAT_H
2
+ #define PyObjC_COMPAT_H
3
+
4
+ #ifndef NS_ASSUME_NONNULL_BEGIN
5
+ /* Old compiler without the Nullability attributes */
6
+ #define NS_ASSUME_NONNULL_BEGIN
7
+ #define NS_ASSUME_NONNULL_END
8
+ #define _Nullable
9
+ #define _Nonnull
10
+ #endif
11
+
12
+ NS_ASSUME_NONNULL_BEGIN
13
+
14
+ /*
15
+ *
16
+ * Start of compiler definitions
17
+ *
18
+ */
19
+ #ifndef __has_feature
20
+ #define __has_feature(x) 0
21
+ #endif
22
+ #ifndef __has_extension
23
+ #define __has_extension(x) __has_feature(x)
24
+ #endif
25
+
26
+ #if __has_extension(c_static_assert)
27
+ #define STATIC_ASSERT(test, message) _Static_assert(test, message)
28
+ #else
29
+ #define STATIC_ASSERT(test, message) \
30
+ switch (0) { \
31
+ case 0: \
32
+ case test:; \
33
+ }
34
+ #endif
35
+
36
+ #if !__has_feature(objc_instancetype)
37
+ #define instancetype id
38
+ #endif
39
+
40
+ #ifdef __has_attribute
41
+ #if __has_attribute(objc_subclassing_restricted)
42
+ #define PyObjC_FINAL_CLASS __attribute__((__objc_subclassing_restricted__))
43
+ #endif
44
+ #endif
45
+ #ifndef PyObjC_FINAL_CLASS
46
+ #define PyObjC_FINAL_CLASS
47
+ #endif
48
+
49
+ /*
50
+ *
51
+ * Start of compiler support helpers
52
+ *
53
+ * XXX: Are these needed?
54
+ */
55
+
56
+ #ifdef __GNUC__
57
+ #define unlikely(x) __builtin_expect(!!(x), 0)
58
+ #define likely(x) __builtin_expect(!!(x), 1)
59
+ #else
60
+ #define likely(x) x
61
+ #define likely(x) x
62
+ #endif
63
+
64
+ /* On some versions of GCC <limits.h> defines LONG_LONG_MAX but not LLONG_MAX, compensate.
65
+ */
66
+ #ifndef LLONG_MIN
67
+ #ifdef LONG_LONG_MIN
68
+ #define LLONG_MIN LONG_LONG_MIN
69
+ #define LLONG_MAX LONG_LONG_MAX
70
+ #define ULLONG_MAX ULONG_LONG_MAX
71
+ #endif
72
+ #endif
73
+
74
+ /*
75
+ *
76
+ * End of compiler support helpers
77
+ *
78
+ * XXX: These two are no longer needed, all supported platforms
79
+ * are 64-bit
80
+ */
81
+
82
+ #if __LP64__
83
+ #define Py_ARG_NSInteger "l"
84
+ #define Py_ARG_NSUInteger "k"
85
+ #else
86
+ #define Py_ARG_NSInteger "i"
87
+ #define Py_ARG_NSUInteger "I"
88
+ #endif
89
+
90
+ #define PyObjC__STR(x) #x
91
+ #define PyObjC_STR(x) PyObjC__STR(x)
92
+
93
+ /*
94
+ *
95
+ * Python version compatibility
96
+ *
97
+ */
98
+
99
+ #ifndef Py_SET_TYPE
100
+ #define Py_SET_TYPE(obj, type) \
101
+ do { \
102
+ Py_TYPE((obj)) = (type); \
103
+ } while (0)
104
+ #endif
105
+
106
+ #ifndef Py_SET_SIZE
107
+ #define Py_SET_SIZE(obj, size) \
108
+ do { \
109
+ Py_SIZE((obj)) = (size); \
110
+ } while (0)
111
+ #endif
112
+
113
+ #ifndef Py_SET_REFCNT
114
+ #define Py_SET_REFCNT(obj, count) \
115
+ do { \
116
+ Py_REFCNT((obj)) = (count); \
117
+ } while (0)
118
+ #endif
119
+
120
+ #if PY_VERSION_HEX < 0x03090000
121
+
122
+ /* For use on Python 3.8 and earlier. PyObjC doesn't use the
123
+ * "flag" bit internally.
124
+ */
125
+
126
+ #ifndef PY_VECTORCALL_ARGUMENTS_OFFSET
127
+ #define PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
128
+ #endif
129
+
130
+ #define PyVectorcall_NARGS(nargsf) ((nargsf) & ~PY_VECTORCALL_ARGUMENTS_OFFSET)
131
+
132
+ #ifdef OBJC_VERSION
133
+ /* Don't use PyObject prefixed symbols in our binaries */
134
+ #define PyObject_Vectorcall PyObjC_Vectorcall
135
+ #define PyObject_VectorcallMethod PyObjC_VectorcallMethod
136
+
137
+ extern PyObject* _Nullable PyObject_Vectorcall(PyObject* callable,
138
+ PyObject* _Nonnull const* _Nonnull args,
139
+ size_t nargsf,
140
+ PyObject* _Nullable kwnames);
141
+ extern PyObject* _Nullable PyObject_VectorcallMethod(
142
+ PyObject* name, PyObject* _Nonnull const* _Nonnull args, size_t nargsf,
143
+ PyObject* _Nullable kwnames);
144
+ #endif
145
+
146
+ #endif /* Python < 3.9 */
147
+
148
+ /* Use CLINIC_SEP between the prototype and
149
+ * description in doc strings, to get clean
150
+ * docstrings.
151
+ */
152
+ #define CLINIC_SEP "--\n"
153
+
154
+ extern int PyObjC_Cmp(PyObject* o1, PyObject* o2, int* result);
155
+
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
+ /*
161
+ * A micro optimization: when using Python 3.3 or later it
162
+ * is possible to access a 'char*' with an ASCII representation
163
+ * of a unicode object without first converting it to a bytes
164
+ * string (if the string can be encoded as ASCII in the first
165
+ * place.
166
+ *
167
+ * This slightly reduces the object allocation rate during
168
+ * attribute access.
169
+ *
170
+ * XXX: Use PyUnicode_AsUTF8 instead.
171
+ */
172
+ extern const char* _Nullable PyObjC_Unicode_Fast_Bytes(PyObject* object);
173
+
174
+ #ifdef __clang__
175
+
176
+ #ifndef Py_LIMITED_API
177
+
178
+ static inline PyObject* _Nullable* _Nonnull PyTuple_ITEMS(PyObject* tuple)
179
+ {
180
+ return &PyTuple_GET_ITEM(tuple, 0);
181
+ }
182
+
183
+ /* This is a crude hack to disable a otherwise useful warning in the context of
184
+ * PyTuple_SET_ITEM, without disabling it everywhere
185
+ */
186
+ #pragma clang diagnostic push
187
+ #pragma clang diagnostic ignored "-Warray-bounds"
188
+ static inline void
189
+ _PyObjCTuple_SetItem(PyObject* tuple, Py_ssize_t idx, PyObject* _Nullable value)
190
+ {
191
+ PyTuple_SET_ITEM(tuple, idx, value);
192
+ }
193
+ #undef PyTuple_SET_ITEM
194
+ #define PyTuple_SET_ITEM(a, b, c) _PyObjCTuple_SetItem(a, b, c)
195
+
196
+ static inline PyObject*
197
+ _PyObjCTuple_GetItem(PyObject* tuple, Py_ssize_t idx)
198
+ {
199
+ return PyTuple_GET_ITEM(tuple, idx);
200
+ }
201
+ #undef PyTuple_GET_ITEM
202
+ #define PyTuple_GET_ITEM(a, b) _PyObjCTuple_GetItem(a, b)
203
+
204
+ #pragma clang diagnostic pop
205
+
206
+ #endif /* !Py_LIMITED_API */
207
+
208
+ #endif /* __clang__ */
209
+
210
+ #define PyObjC_BEGIN_WITH_GIL \
211
+ { \
212
+ PyGILState_STATE _GILState; \
213
+ _GILState = PyGILState_Ensure();
214
+
215
+ #define PyObjC_GIL_FORWARD_EXC() \
216
+ do { \
217
+ PyObjCErr_ToObjCWithGILState(&_GILState); \
218
+ } while (0)
219
+
220
+ #define PyObjC_GIL_RETURN(val) \
221
+ do { \
222
+ PyGILState_Release(_GILState); \
223
+ return (val); \
224
+ } while (0)
225
+
226
+ #define PyObjC_GIL_RETURNVOID \
227
+ do { \
228
+ PyGILState_Release(_GILState); \
229
+ return; \
230
+ } while (0)
231
+
232
+ #define PyObjC_END_WITH_GIL \
233
+ PyGILState_Release(_GILState); \
234
+ }
235
+
236
+ #define PyObjC_LEAVE_GIL \
237
+ do { \
238
+ PyGILState_Release(_GILState); \
239
+ } while (0)
240
+
241
+ extern PyObject* _Nullable PyObjC_get_tp_dict(PyTypeObject* _Nonnull tp);
242
+
243
+ NS_ASSUME_NONNULL_END
244
+
245
+ #endif /* PyObjC_COMPAT_H */
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobjc-framework-Automator
3
- Version: 10.0
3
+ Version: 10.2
4
4
  Summary: Wrappers for the framework Automator on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -23,6 +23,7 @@ Classifier: Programming Language :: Python :: 3.9
23
23
  Classifier: Programming Language :: Python :: 3.10
24
24
  Classifier: Programming Language :: Python :: 3.11
25
25
  Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
26
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
28
  Classifier: Programming Language :: Objective C
28
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -30,8 +31,8 @@ Classifier: Topic :: Software Development :: User Interfaces
30
31
  Requires-Python: >=3.8
31
32
  Description-Content-Type: text/x-rst; charset=UTF-8
32
33
  License-File: LICENSE.txt
33
- Requires-Dist: pyobjc-core>=10.0
34
- Requires-Dist: pyobjc-framework-Cocoa>=10.0
34
+ Requires-Dist: pyobjc-core>=10.2
35
+ Requires-Dist: pyobjc-framework-Cocoa>=10.2
35
36
 
36
37
 
37
38
  Wrappers for the "Automator" framework on macOS. The Automator framework
@@ -213,6 +213,7 @@ Programming Language :: Python :: 3.9
213
213
  Programming Language :: Python :: 3.10
214
214
  Programming Language :: Python :: 3.11
215
215
  Programming Language :: Python :: 3.12
216
+ Programming Language :: Python :: 3.13
216
217
  Programming Language :: Python :: Implementation :: CPython
217
218
  Programming Language :: Objective C
218
219
  Topic :: Software Development :: Libraries :: Python Modules
@@ -576,19 +577,19 @@ def setup(min_os_level=None, max_os_level=None, cmdclass=None, **kwds):
576
577
  if min_os_level is not None:
577
578
  if max_os_level is not None:
578
579
  msg = (
579
- "This distribution is only supported on MacOSX "
580
+ "This distribution is only supported on macOS "
580
581
  "versions %s up to and including %s" % (min_os_level, max_os_level)
581
582
  )
582
583
  else:
583
- msg = "This distribution is only supported on MacOSX >= {}".format(
584
+ msg = "This distribution is only supported on macOS >= {}".format(
584
585
  min_os_level,
585
586
  )
586
587
  elif max_os_level is not None:
587
- msg = "This distribution is only supported on MacOSX <= {}".format(
588
+ msg = "This distribution is only supported on macOS <= {}".format(
588
589
  max_os_level,
589
590
  )
590
591
  else:
591
- msg = "This distribution is only supported on MacOSX"
592
+ msg = "This distribution is only supported on macOS"
592
593
 
593
594
  def create_command_subclass(base_class):
594
595
  class subcommand(base_class):
@@ -15,15 +15,29 @@ import sys
15
15
  sys.path.insert(0, os.path.dirname(__file__))
16
16
 
17
17
 
18
- from pyobjc_setup import setup # noqa: E402
18
+ from pyobjc_setup import setup, Extension # noqa: E402
19
19
 
20
- VERSION = "10.0"
20
+ VERSION = "10.2"
21
21
 
22
22
  setup(
23
23
  name="pyobjc-framework-Automator",
24
24
  description="Wrappers for the framework Automator on macOS",
25
25
  packages=["Automator"],
26
+ ext_modules=[
27
+ Extension(
28
+ "Automator._Automator",
29
+ ["Modules/_Automator.m"],
30
+ extra_link_args=["-framework", "Automator"],
31
+ py_limited_api=True,
32
+ depends=[
33
+ os.path.join("Modules", fn)
34
+ for fn in os.listdir("Modules")
35
+ if fn.startswith("_Automator")
36
+ ],
37
+ )
38
+ ],
26
39
  version=VERSION,
27
40
  install_requires=["pyobjc-core>=" + VERSION, "pyobjc-framework-Cocoa>=" + VERSION],
28
41
  long_description=__doc__,
42
+ options={"bdist_wheel": {"py_limited_api": "cp36"}},
29
43
  )
@@ -1,2 +0,0 @@
1
- pyobjc-core>=10.0
2
- pyobjc-framework-Cocoa>=10.0