Skip to content

Commit 5e3b1e2

Browse files
committed
snap
1 parent 8eca975 commit 5e3b1e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+7437
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# dirs, files, and patters to exclude
22
**/project.xcworkspace
33
**/xcshareddata
4+
**/xcuserdata
45
*.dylib
56
*.mxe
67
*.mxe64

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ beeware-ext: clean-externals
330330
pyjs pyjs-static pyjs-shared pyjs-framework pyjs-framework-pkg \
331331
mamba mamba-static mamba-shared mamba-framework mamba-framework-pkg \
332332
cobra cobra-static cobra-shared cobra-framework cobra-framework-pkg \
333-
krait jmx ztp zpy zedit shell
333+
krait jmx ztp zpy zedit shell xpyc
334334

335335

336336
py: clean-cmake-cache clean-externals
@@ -420,6 +420,9 @@ zpy: clean-cmake-cache clean-externals
420420
ztp: clean-cmake-cache clean-externals
421421
$(call xcode-target,$@,local)
422422

423+
xpyc: clean-cmake-cache clean-externals
424+
$(call xcode-target,$@,local)
425+
423426
shell: clean-cmake-cache clean-externals
424427
$(call xcode-target,$@,local)
425428

TODO.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# TODO
22

3-
- [ ] Archive `zpy`, which is not so useful now, given `ztp`
4-
53
- [ ] Alternatively, use [buildpy](https://github.com/shakfu/buildpy) and [xcodegen](https://github.com/yonaskolb/XcodeGen) to build relocatable
64
python builds, generate xccongfig and xcode projects
75

help/xpyc.maxhelp

+282
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
{
2+
"patcher" : {
3+
"fileversion" : 1,
4+
"appversion" : {
5+
"major" : 9,
6+
"minor" : 0,
7+
"revision" : 5,
8+
"architecture" : "x64",
9+
"modernui" : 1
10+
}
11+
,
12+
"classnamespace" : "box",
13+
"rect" : [ 81.0, 109.0, 640.0, 480.0 ],
14+
"gridsize" : [ 15.0, 15.0 ],
15+
"boxes" : [ {
16+
"box" : {
17+
"id" : "obj-18",
18+
"maxclass" : "message",
19+
"numinlets" : 2,
20+
"numoutlets" : 1,
21+
"outlettype" : [ "" ],
22+
"patching_rect" : [ 201.0, 124.0, 97.0, 22.0 ],
23+
"text" : "request 100*200"
24+
}
25+
26+
}
27+
, {
28+
"box" : {
29+
"id" : "obj-13",
30+
"maxclass" : "message",
31+
"numinlets" : 2,
32+
"numoutlets" : 1,
33+
"outlettype" : [ "" ],
34+
"patching_rect" : [ 51.0, 239.0, 29.5, 22.0 ],
35+
"text" : "set"
36+
}
37+
38+
}
39+
, {
40+
"box" : {
41+
"id" : "obj-15",
42+
"maxclass" : "message",
43+
"numinlets" : 2,
44+
"numoutlets" : 1,
45+
"outlettype" : [ "" ],
46+
"patching_rect" : [ 51.0, 124.0, 86.0, 22.0 ],
47+
"text" : "request 1+200"
48+
}
49+
50+
}
51+
, {
52+
"box" : {
53+
"id" : "obj-8",
54+
"maxclass" : "message",
55+
"numinlets" : 2,
56+
"numoutlets" : 1,
57+
"outlettype" : [ "" ],
58+
"patching_rect" : [ 51.0, 279.0, 108.0, 22.0 ],
59+
"text" : "20000"
60+
}
61+
62+
}
63+
, {
64+
"box" : {
65+
"id" : "obj-16",
66+
"maxclass" : "newobj",
67+
"numinlets" : 1,
68+
"numoutlets" : 1,
69+
"outlettype" : [ "bang" ],
70+
"patching_rect" : [ 415.0, 273.5, 58.0, 22.0 ],
71+
"text" : "loadbang"
72+
}
73+
74+
}
75+
, {
76+
"box" : {
77+
"id" : "obj-14",
78+
"maxclass" : "message",
79+
"numinlets" : 2,
80+
"numoutlets" : 1,
81+
"outlettype" : [ "" ],
82+
"patching_rect" : [ 415.0, 323.5, 35.0, 22.0 ],
83+
"text" : "set 0"
84+
}
85+
86+
}
87+
, {
88+
"box" : {
89+
"id" : "obj-12",
90+
"maxclass" : "message",
91+
"numinlets" : 2,
92+
"numoutlets" : 1,
93+
"outlettype" : [ "" ],
94+
"patching_rect" : [ 448.0, 426.5, 50.0, 22.0 ],
95+
"text" : "0"
96+
}
97+
98+
}
99+
, {
100+
"box" : {
101+
"id" : "obj-10",
102+
"maxclass" : "newobj",
103+
"numinlets" : 5,
104+
"numoutlets" : 4,
105+
"outlettype" : [ "int", "", "", "int" ],
106+
"patching_rect" : [ 479.0, 382.5, 61.0, 22.0 ],
107+
"text" : "counter"
108+
}
109+
110+
}
111+
, {
112+
"box" : {
113+
"id" : "obj-9",
114+
"maxclass" : "button",
115+
"numinlets" : 1,
116+
"numoutlets" : 1,
117+
"outlettype" : [ "bang" ],
118+
"parameter_enable" : 0,
119+
"patching_rect" : [ 557.0, 382.5, 55.0, 55.0 ]
120+
}
121+
122+
}
123+
, {
124+
"box" : {
125+
"id" : "obj-6",
126+
"maxclass" : "toggle",
127+
"numinlets" : 1,
128+
"numoutlets" : 1,
129+
"outlettype" : [ "int" ],
130+
"parameter_enable" : 0,
131+
"patching_rect" : [ 479.0, 223.5, 24.0, 24.0 ]
132+
}
133+
134+
}
135+
, {
136+
"box" : {
137+
"id" : "obj-2",
138+
"maxclass" : "newobj",
139+
"numinlets" : 2,
140+
"numoutlets" : 1,
141+
"outlettype" : [ "bang" ],
142+
"patching_rect" : [ 479.0, 323.5, 63.0, 22.0 ],
143+
"text" : "metro 100"
144+
}
145+
146+
}
147+
, {
148+
"box" : {
149+
"fontsize" : 16.0,
150+
"id" : "obj-5",
151+
"maxclass" : "comment",
152+
"numinlets" : 1,
153+
"numoutlets" : 0,
154+
"patching_rect" : [ 23.0, 17.0, 578.0, 24.0 ],
155+
"text" : "xpyc: an xpc client embedded in an external (now just addition of two numbers)"
156+
}
157+
158+
}
159+
, {
160+
"box" : {
161+
"id" : "obj-3",
162+
"maxclass" : "button",
163+
"numinlets" : 1,
164+
"numoutlets" : 1,
165+
"outlettype" : [ "bang" ],
166+
"parameter_enable" : 0,
167+
"patching_rect" : [ 140.0, 156.0, 24.0, 24.0 ]
168+
}
169+
170+
}
171+
, {
172+
"box" : {
173+
"id" : "obj-1",
174+
"maxclass" : "newobj",
175+
"numinlets" : 1,
176+
"numoutlets" : 1,
177+
"outlettype" : [ "" ],
178+
"patching_rect" : [ 140.0, 206.0, 33.0, 22.0 ],
179+
"text" : "xpyc"
180+
}
181+
182+
}
183+
],
184+
"lines" : [ {
185+
"patchline" : {
186+
"destination" : [ "obj-8", 1 ],
187+
"source" : [ "obj-1", 0 ]
188+
}
189+
190+
}
191+
, {
192+
"patchline" : {
193+
"destination" : [ "obj-12", 1 ],
194+
"source" : [ "obj-10", 0 ]
195+
}
196+
197+
}
198+
, {
199+
"patchline" : {
200+
"destination" : [ "obj-8", 0 ],
201+
"source" : [ "obj-13", 0 ]
202+
}
203+
204+
}
205+
, {
206+
"patchline" : {
207+
"destination" : [ "obj-10", 0 ],
208+
"order" : 0,
209+
"source" : [ "obj-14", 0 ]
210+
}
211+
212+
}
213+
, {
214+
"patchline" : {
215+
"destination" : [ "obj-12", 0 ],
216+
"order" : 1,
217+
"source" : [ "obj-14", 0 ]
218+
}
219+
220+
}
221+
, {
222+
"patchline" : {
223+
"destination" : [ "obj-1", 0 ],
224+
"source" : [ "obj-15", 0 ]
225+
}
226+
227+
}
228+
, {
229+
"patchline" : {
230+
"destination" : [ "obj-14", 0 ],
231+
"source" : [ "obj-16", 0 ]
232+
}
233+
234+
}
235+
, {
236+
"patchline" : {
237+
"destination" : [ "obj-1", 0 ],
238+
"source" : [ "obj-18", 0 ]
239+
}
240+
241+
}
242+
, {
243+
"patchline" : {
244+
"destination" : [ "obj-10", 0 ],
245+
"order" : 1,
246+
"source" : [ "obj-2", 0 ]
247+
}
248+
249+
}
250+
, {
251+
"patchline" : {
252+
"destination" : [ "obj-9", 0 ],
253+
"order" : 0,
254+
"source" : [ "obj-2", 0 ]
255+
}
256+
257+
}
258+
, {
259+
"patchline" : {
260+
"destination" : [ "obj-1", 0 ],
261+
"source" : [ "obj-3", 0 ]
262+
}
263+
264+
}
265+
, {
266+
"patchline" : {
267+
"destination" : [ "obj-2", 0 ],
268+
"source" : [ "obj-6", 0 ]
269+
}
270+
271+
}
272+
],
273+
"originid" : "pat-4",
274+
"dependency_cache" : [ {
275+
"name" : "xpyc.mxo",
276+
"type" : "iLaX"
277+
}
278+
],
279+
"autosave" : 0
280+
}
281+
282+
}

source/projects/xpyc/CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG for `xpyc` object
2+
3+
[0.1.0]
4+
5+
- Proof-of-concept attempt to access a python interpreter via the use of xpc channels.

source/projects/xpyc/CMakeLists.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
include(${CMAKE_CURRENT_SOURCE_DIR}/../../max-sdk-base/script/max-pretarget.cmake)
2+
include(${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/cmake/common.cmake)
3+
4+
include(${CMAKE_SOURCE_DIR}/source/scripts/cmake/fn_python3_external.cmake)
5+
6+
python3_external(
7+
PROJECT_NAME ${PROJECT_NAME}
8+
BUILD_VARIANT ${BUILD_VARIANT}
9+
)
10+
11+
set(XPCSERVICES_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${${PROJECT_NAME}_EXTERN_OUTPUT_NAME}.mxo/Contents/XPCServices")
12+
13+
add_custom_command(
14+
TARGET ${PROJECT_NAME}
15+
POST_BUILD
16+
COMMAND mkdir -p ${XPCSERVICES_DIR}
17+
COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/PythonService.xpc ${XPCSERVICES_DIR}
18+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
19+
COMMENT "Copy xpc service to bundle"
20+
)
21+
22+
include(${CMAKE_CURRENT_SOURCE_DIR}/../../max-sdk-base/script/max-posttarget.cmake)

0 commit comments

Comments
 (0)