iris-pex-embedded-python 2.3.3__py3-none-any.whl → 2.3.5__py3-none-any.whl

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.

Potentially problematic release.


This version of iris-pex-embedded-python might be problematic. Click here for more details.

Files changed (32) hide show
  1. grongier/pex/_business_process.py +7 -1
  2. grongier/pex/_cli.py +9 -1
  3. grongier/pex/_common.py +4 -3
  4. grongier/pex/_utils.py +15 -6
  5. grongier/pex/data/PEX/BusinessOperation.cls +35 -0
  6. grongier/pex/data/PEX/BusinessProcess.cls +118 -0
  7. grongier/pex/data/PEX/BusinessService.cls +35 -0
  8. grongier/pex/data/PEX/Common.cls +146 -0
  9. grongier/pex/data/PEX/Director.cls +57 -0
  10. grongier/pex/data/PEX/Duplex/Operation.cls +29 -0
  11. grongier/pex/data/PEX/Duplex/Process.cls +229 -0
  12. grongier/pex/data/PEX/Duplex/Service.cls +9 -0
  13. grongier/pex/data/PEX/InboundAdapter.cls +22 -0
  14. grongier/pex/data/PEX/Message.cls +128 -0
  15. grongier/pex/data/PEX/OutboundAdapter.cls +36 -0
  16. grongier/pex/data/PEX/PickleMessage.cls +58 -0
  17. grongier/pex/data/PEX/PrivateSession/Duplex.cls +260 -0
  18. grongier/pex/data/PEX/PrivateSession/Message/Ack.cls +32 -0
  19. grongier/pex/data/PEX/PrivateSession/Message/Poll.cls +32 -0
  20. grongier/pex/data/PEX/PrivateSession/Message/Start.cls +32 -0
  21. grongier/pex/data/PEX/PrivateSession/Message/Stop.cls +48 -0
  22. grongier/pex/data/PEX/Test.cls +62 -0
  23. grongier/pex/data/PEX/Utils.cls +363 -0
  24. grongier/pex/data/PEX/WSGI.cls +99 -0
  25. {iris_pex_embedded_python-2.3.3.dist-info → iris_pex_embedded_python-2.3.5.dist-info}/METADATA +1 -1
  26. iris_pex_embedded_python-2.3.5.dist-info/RECORD +42 -0
  27. grongier/iris/__init__.py +0 -0
  28. iris_pex_embedded_python-2.3.3.dist-info/RECORD +0 -23
  29. {iris_pex_embedded_python-2.3.3.dist-info → iris_pex_embedded_python-2.3.5.dist-info}/LICENSE +0 -0
  30. {iris_pex_embedded_python-2.3.3.dist-info → iris_pex_embedded_python-2.3.5.dist-info}/WHEEL +0 -0
  31. {iris_pex_embedded_python-2.3.3.dist-info → iris_pex_embedded_python-2.3.5.dist-info}/entry_points.txt +0 -0
  32. {iris_pex_embedded_python-2.3.3.dist-info → iris_pex_embedded_python-2.3.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,363 @@
1
+ /* Copyright (c) 2021 by InterSystems Corporation.
2
+ Cambridge, Massachusetts, U.S.A. All rights reserved.
3
+ Confidential property of InterSystems Corporation. */
4
+
5
+ Include Ensemble
6
+
7
+ Class Grongier.PEX.Utils Extends %RegisteredObject
8
+ {
9
+
10
+ ClassMethod dispatchRegisterComponent(
11
+ pModule As %String,
12
+ pRemoteClassname As %String,
13
+ pCLASSPATHS As %String = "",
14
+ pOverwrite As %Boolean = 0,
15
+ pProxyClassname As %String = "") As %Status
16
+ {
17
+ set tSc = $$$OK
18
+ $$$ThrowOnError(##class(Grongier.PEX.Utils).RegisterComponent(pModule, pRemoteClassname, pCLASSPATHS, pOverwrite , pProxyClassname))
19
+ return tSc
20
+ }
21
+
22
+ /// "bo","Duplex","/irisdev/app/src/python/demo/duplex/",1,"Duplex.Duplex"
23
+ ClassMethod RegisterComponent(
24
+ pModule As %String,
25
+ pRemoteClassname As %String,
26
+ pCLASSPATHS As %String = "",
27
+ pOverwrite As %Boolean = 0,
28
+ pProxyClassname As %String = "") As %Status
29
+ {
30
+ #dim tSC As %Status = $$$OK
31
+ #dim ex As %Exception.AbstractException
32
+ #dim tLanguage,tExtraClasspaths,tDelimiter,tOnePath As %String = ""
33
+ #dim tClassDetails,tRemoteSettings As %String = ""
34
+ #dim tClasspaths As %ListOfDataTypes
35
+
36
+ Quit:(""=pRemoteClassname) $$$ERROR($$$EnsErrGeneral,"Remote Classname must be specified in order to register a Production EXtensions component")
37
+ Quit:(""=pModule) $$$ERROR($$$EnsErrGeneral,"Must specify the module of the remote code.")
38
+
39
+ Try {
40
+
41
+ $$$ThrowOnError(..GetRemoteClassInfo(pRemoteClassname,pModule,pCLASSPATHS,.tClassDetails,.tRemoteSettings))
42
+
43
+ Set tConnectionSettings("Classpaths") = pCLASSPATHS
44
+ Set tConnectionSettings("Module") = pModule
45
+ Set tConnectionSettings("Classname") = pRemoteClassname
46
+ Set:(""=pProxyClassname) pProxyClassname = "User."_pRemoteClassname
47
+
48
+ $$$ThrowOnError(..GenerateProxyClass(pProxyClassname,.tConnectionSettings,tClassDetails,tRemoteSettings,pOverwrite))
49
+
50
+ } Catch ex {
51
+ set msg = $System.Status.GetOneStatusText(ex.AsStatus(),1)
52
+ set tSC = $$$ERROR($$$EnsErrGeneral,msg)
53
+ }
54
+
55
+ Quit tSC
56
+ }
57
+
58
+ ClassMethod DeleteComponentProxy(pClassname As %String = "") As %Status
59
+ {
60
+ #dim tSC As %Status = $$$OK
61
+ #dim ex As %Exception.AbstractException
62
+ #dim tIsPEX As %Boolean = 0
63
+ #dim tClass As %Dictionary.CompiledClass
64
+
65
+ Quit:(""=pClassname) $$$ERROR($$$EnsErrGeneral,"Remote class name must be specified.")
66
+
67
+ Try {
68
+
69
+ If '##class(%Dictionary.ClassDefinition).%ExistsId(pClassname) {
70
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("No proxy class defined for remote class '%1'.",pClassname))
71
+ Quit
72
+ }
73
+ If $classmethod(pClassname,"%Extends","Grongier.PEX.Common") {
74
+ Set tClass = ##class(%Dictionary.CompiledClass).%OpenId(pClassname,,.tSC)
75
+ Quit:$$$ISERR(tSC)
76
+ If '$IsObject(tClass) {
77
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Proxy class for remote class '%1' could not be opened.",pClassname))
78
+ Quit
79
+ }
80
+ Set tIsPEX = ("Grongier.PEX.Utils" = tClass.GeneratedBy)
81
+ }
82
+ If tIsPEX {
83
+ Set tSC = ##class(%Dictionary.ClassDefinition).%DeleteId(pClassname)
84
+ If $$$ISERR(tSC) {
85
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Unable to delete proxy class for remote class '%1' : '%2'.",pClassname,$System.Status.GetErrorText(tSC)))
86
+ Quit
87
+ }
88
+ } Else {
89
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Cannot delete class '%1' because it is not a PEX proxy class.",pClassname))
90
+ Quit
91
+ }
92
+
93
+ } Catch ex {
94
+ Set tSC = ex.AsStatus()
95
+ }
96
+
97
+ Quit tSC
98
+ }
99
+
100
+ // ..GetRemoteClassInfo(pRemoteClassname,pModule,pCLASSPATHS,.tClassDetails,.tRemoteSettings)
101
+
102
+ ClassMethod GetRemoteClassInfo(
103
+ pRemoteClassname As %String,
104
+ pModule As %String,
105
+ pClasspaths As %String,
106
+ ByRef pClassDetails,
107
+ ByRef pRemoteSettings) As %Status [ Internal, Private ]
108
+ {
109
+ #dim tSC As %Status = $$$OK
110
+ #dim ex As %Exception.AbstractException
111
+ #dim tGateway As %External.Gateway
112
+ #dim tGatewayProxy As %Net.Remote.Object
113
+
114
+ Try {
115
+ if pClasspaths '="" {
116
+ set sys = ##class(%SYS.Python).Import("sys")
117
+ set delimiter = $s($system.Version.GetOS()="Windows":";",1:":")
118
+ set extraClasspaths = $tr(pClasspaths,delimiter,"|")
119
+ for i=1:1:$l(extraClasspaths,"|") {
120
+ set onePath = $p(extraClasspaths,"|",i)
121
+ set onePath = ##class(%File).NormalizeDirectory(onePath)
122
+ if onePath?1"$$IRISHOME"1P.E set onePath = $e($system.Util.InstallDirectory(),1,*-1)_$e(onePath,11,*)
123
+ if onePath'="" do sys.path.append(onePath)
124
+ }
125
+ }
126
+ ;
127
+
128
+ set importlib = ##class(%SYS.Python).Import("importlib")
129
+ set builtins = ##class(%SYS.Python).Import("builtins")
130
+ set module = importlib."import_module"(pModule)
131
+ set class = builtins.getattr(module, pRemoteClassname)
132
+ set tClass = class."__new__"(class)
133
+
134
+
135
+ If $IsObject(tClass) {
136
+ #; List of information about the class as a whole - $lb(SuperClass, Description, InfoURL, IconURL, Adapter)
137
+ Set pClassDetails = tClass."_get_info"()
138
+ #; List of information about the various properties of the class
139
+ #; List of lists of form $lb(propName,dataType,defaultVal,required,category,description)
140
+ Set pRemoteSettings = tClass."_get_properties"()
141
+ } Else {
142
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Error opening gateway proxy for class '%1'"),pRemoteClassname)
143
+ }
144
+ } Catch ex {
145
+ set msg = $System.Status.GetOneStatusText(ex.AsStatus(),1)
146
+ set tSC = $$$ERROR($$$EnsErrGeneral,msg)
147
+ }
148
+
149
+ Quit tSC
150
+ }
151
+
152
+ /// Set tConnectionSettings("Classpaths") = pCLASSPATHS
153
+ /// Set tConnectionSettings("Module") = pModule
154
+ /// Set tConnectionSettings("Classname") = pRemoteClassname
155
+ /// Set:(""=pProxyClassname) pProxyClassname = pRemoteClassname
156
+ ///
157
+ /// Set tSC = ..GenerateProxyClass(pProxyClassname,.tConnectionSettings,tClassDetails,tRemoteSettings,pOverwrite)
158
+ /// "bo","Duplex","/irisdev/app/src/python/demo/duplex/",1,"Duplex.Duplex"
159
+ ClassMethod GenerateProxyClass(
160
+ pClassname As %String,
161
+ ByRef pConnectionSettings,
162
+ pClassDetails As %String = "",
163
+ pRemoteSettings As %String = "",
164
+ pOverwrite As %Boolean = 0) As %Status [ Internal, Private ]
165
+ {
166
+ #dim tSC As %Status = $$$OK
167
+ #dim ex As %Exception.AbstractException
168
+
169
+ Quit:(""=pClassname) $$$ERROR($$$EnsErrGeneral,"Class name must be specified in order to generate a proxy class for this Production EXtensions component")
170
+
171
+ Try {
172
+
173
+ If ##class(%Dictionary.ClassDefinition).%ExistsId(pClassname) {
174
+ If 'pOverwrite {
175
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Proxy class '%1' already exists.",pClassname))
176
+ Quit
177
+ } Else {
178
+ #dim tIsPEX As %Boolean = 0
179
+ If $classmethod(pClassname,"%Extends","Grongier.PEX.Common") {
180
+ #dim tClass As %Dictionary.CompiledClass = ##class(%Dictionary.CompiledClass).%OpenId(pClassname)
181
+ If '$IsObject(tClass) {
182
+ Set tSC = $$$ERROR($$$EnsErrGeneral,"Class not found")
183
+ Quit
184
+ }
185
+ Set tIsPEX = ("Grongier.PEX.Utils" = tClass.GeneratedBy)
186
+ }
187
+ If tIsPEX {
188
+ Set tSC = ##class(%Dictionary.ClassDefinition).%DeleteId(pClassname)
189
+ If $$$ISERR(tSC) {
190
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Unable to delete existing proxy class '%1' : '%2'.",pClassname,$System.Status.GetErrorText(tSC)))
191
+ Quit
192
+ }
193
+ } Else {
194
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Cannot overwrite class '%1' because it is not a PEX proxy class.",pClassname))
195
+ Quit
196
+ }
197
+ }
198
+ }
199
+
200
+ #; create subclass of the ObjectScript Business Host
201
+ #dim tCOSClass As %Dictionary.ClassDefinition
202
+ Set tCOSClass = ##class(%Dictionary.ClassDefinition).%New()
203
+ Set tCOSClass.Name = pClassname
204
+
205
+ #dim tSuperClass As %String = pClassDetails."__getitem__"(0)
206
+ If (""=tSuperClass) {
207
+ Set tSC = $$$ERROR($$$EnsErrGeneral,"No PEX superclass found.")
208
+ Quit
209
+ }
210
+ If '$Case($P(tSuperClass,".",*),"DuplexProcess":1,"DuplexService":1,"DuplexOperation":1,"InboundAdapter":1,"OutboundAdapter":1,"BusinessService":1,"BusinessProcess":1,"BusinessOperation":1,:0) {
211
+ Set tSC = $$$ERROR($$$EnsErrGeneral,"Invalid superclass")
212
+ Quit
213
+ }
214
+ Set tSuperClass = "Grongier.PEX."_$P(tSuperClass,".",*)
215
+
216
+ Set tCOSClass.Super = tSuperClass
217
+ Set tCOSClass.GeneratedBy = $CLASSNAME()
218
+ Set tCOSClass.ClassVersion = $$$CLASSDEFINITIONVERSION
219
+ #dim tDescription As %String = pClassDetails."__getitem__"(1)
220
+ If (""'=tDescription) {
221
+ Set tCOSClass.Description = $Replace(tDescription,$C(10),$C(13,10))
222
+ }
223
+
224
+ #; Do not display any of the connection settings
225
+ #dim tSETTINGSParamValue As %String = "%classname:Python $type,%module:Python $type,%settings:Python $type,%classpaths:Python $type"
226
+
227
+ #dim tPropClassname As %Dictionary.PropertyDefinition = ##class(%Dictionary.PropertyDefinition).%New()
228
+ Set tPropClassname.Name = "%classname"
229
+ Set tPropClassname.Type = "%String"
230
+ Set tPropClassname.InitialExpression = $$$quote(pConnectionSettings("Classname"))
231
+ Set tPropClassname.Internal = 1
232
+ Set tSC = tCOSClass.Properties.Insert(tPropClassname)
233
+ Quit:$$$ISERR(tSC)
234
+
235
+
236
+ #dim tPropClasspaths As %Dictionary.PropertyDefinition = ##class(%Dictionary.PropertyDefinition).%New()
237
+ Set tPropClasspaths.Name = "%classpaths"
238
+ Set tPropClasspaths.Type = "%String"
239
+ Set tSC = tPropClasspaths.Parameters.SetAt("","MAXLEN")
240
+ Quit:$$$ISERR(tSC)
241
+ Set tPropClasspaths.InitialExpression = $$$quote(pConnectionSettings("Classpaths"))
242
+ Set tPropClasspaths.Description = "One or more Classpaths (separated by '|' character) needed in addition to the ones configured in the Remote Gateway"
243
+ Set tSC = tCOSClass.Properties.Insert(tPropClasspaths)
244
+ Quit:$$$ISERR(tSC)
245
+
246
+
247
+ #dim tPropLanguage As %Dictionary.PropertyDefinition = ##class(%Dictionary.PropertyDefinition).%New()
248
+ Set tPropLanguage.Name = "%module"
249
+ Set tPropLanguage.Type = "%String"
250
+ Set tPropLanguage.Internal = 1
251
+ Set tPropLanguage.InitialExpression = $$$quote(pConnectionSettings("Module"))
252
+ Set tSC = tCOSClass.Properties.Insert(tPropLanguage)
253
+ Quit:$$$ISERR(tSC)
254
+
255
+ If $Case(tSuperClass,"Grongier.PEX.BusinessService":1,"Grongier.PEX.BusinessOperation":1,"Grongier.PEX.DuplexService":1,"Grongier.PEX.DuplexOperation":1,:0) {
256
+ set builtins = ##class(%SYS.Python).Import("builtins")
257
+ If (builtins.len(pClassDetails)>4) { //Adaptor
258
+
259
+ #dim tAdapterClass = pClassDetails."__getitem__"(4)
260
+ #; May want to issue a warning in the UI if the Adapter class does not exist
261
+ #; but we don't check here because it does compile and may just be that the user is registering the Service/Operation before the Adapter
262
+ #dim tADAPTERParam As %Dictionary.ParameterDefinition = ##class(%Dictionary.ParameterDefinition).%New()
263
+ Set tADAPTERParam.Name = "ADAPTER"
264
+ Set tADAPTERParam.Default = tAdapterClass
265
+ Set tSC = tCOSClass.Parameters.Insert(tADAPTERParam)
266
+ Quit:$$$ISERR(tSC)
267
+ }
268
+ }
269
+
270
+ set type = ""
271
+ set:($Case(tSuperClass,"Grongier.PEX.InboundAdapter":1,"Grongier.PEX.OutboundAdapter":1,:0)) type = "Adapter"
272
+ set tSETTINGSParamValue = $REPLACE(tSETTINGSParamValue,"$type",type)
273
+
274
+ #dim tSETTINGSParam As %Dictionary.ParameterDefinition = ##class(%Dictionary.ParameterDefinition).%New()
275
+ Set tSETTINGSParam.Name = "SETTINGS"
276
+ Set tSETTINGSParam.Default = tSETTINGSParamValue
277
+ Set tSC = tCOSClass.Parameters.Insert(tSETTINGSParam)
278
+ Quit:$$$ISERR(tSC)
279
+
280
+ Set tSC = tCOSClass.%Save()
281
+ Quit:$$$ISERR(tSC)
282
+
283
+ Set tSC = $System.OBJ.Compile(pClassname,"-d")
284
+
285
+ } Catch ex {
286
+ Set tSC = ex.AsStatus()
287
+ }
288
+
289
+ Quit tSC
290
+ }
291
+
292
+ ClassMethod CreateProduction(
293
+ package As %String = "test",
294
+ name As %String = "AutoCreatedProduction",
295
+ xdata As %CharacterStream) As %Status
296
+ {
297
+ #Dim produtionClassName As %String = package _ "." _ name
298
+ If ('$ZName(produtionClassName, 4))
299
+ {
300
+ Return $System.Status.Error(5001, "Invalid Production package or name.")
301
+ }
302
+ #Dim productionDefinition As %Dictionary.ClassDefinition
303
+ // Check if the production already exists
304
+ If (##class(%Dictionary.ClassDefinition).%ExistsId(produtionClassName))
305
+ {
306
+ // Open the production
307
+ set productionDefinition = ##class(%Dictionary.ClassDefinition).%OpenId(produtionClassName)
308
+ }
309
+ Else
310
+ {
311
+ // Create the production definition
312
+ set productionDefinition = ##Class(%Dictionary.ClassDefinition).%New()
313
+ }
314
+ //
315
+ Set productionDefinition.Name = produtionClassName
316
+ Set productionDefinition.Super = "Ens.Production"
317
+ Set productionDefinition.ClassVersion = 25
318
+ //
319
+ // Check if the XData Definition already exists
320
+ If (##Class(%Dictionary.XDataDefinition).%ExistsId(produtionClassName_"||ProductionDefinition"))
321
+ {
322
+ // delete the XData Definition
323
+ $$$ThrowOnError(##Class(%Dictionary.XDataDefinition).%DeleteId(produtionClassName_"||ProductionDefinition"))
324
+ }
325
+ #Dim xdataDefinition As %Dictionary.XDataDefinition = ##Class(%Dictionary.XDataDefinition).%New()
326
+ //
327
+ Set xdataDefinition.Name = "ProductionDefinition"
328
+ //
329
+ Do xdataDefinition.Data.CopyFrom(xdata)
330
+ //
331
+ // Insert XData Definition into Production Definition
332
+ Do productionDefinition.XDatas.Insert(xdataDefinition)
333
+ //
334
+ #Dim statusCode As %Status = productionDefinition.%Save()
335
+ //
336
+ If ($System.Status.IsError(statusCode))
337
+ {
338
+ Return statusCode
339
+ }
340
+ // Compile the production class
341
+ return $System.OBJ.Compile(produtionClassName,"k-d")
342
+ }
343
+
344
+ /// Export a production to an XML string
345
+ ClassMethod ExportProduction(pProductionName As %String) As %String
346
+ {
347
+ Set sc = $$$OK
348
+ set xdata = ""
349
+ // Check if the XData Definition exists
350
+ If (##Class(%Dictionary.XDataDefinition).%ExistsId(pProductionName_"||ProductionDefinition"))
351
+ {
352
+ // Open the XData Definition
353
+ Set xdataDefinition = ##Class(%Dictionary.XDataDefinition).%OpenId(pProductionName_"||ProductionDefinition")
354
+ Set xdata = xdataDefinition.Data
355
+ }
356
+ Else
357
+ {
358
+ $$$ThrowOnError($System.Status.Error(5001, "Production does not exist."))
359
+ }
360
+ Return xdata
361
+ }
362
+
363
+ }
@@ -0,0 +1,99 @@
1
+ Class Grongier.PEX.WSGI Extends (%RegisteredObject, %CSP.REST) [ ServerOnly = 1 ]
2
+ {
3
+
4
+ Parameter CLASSPATHS;
5
+
6
+ Parameter MODULENAME;
7
+
8
+ Parameter APPNAME;
9
+
10
+ /// Instance of class
11
+ Property app As %SYS.Python;
12
+
13
+ /// Helper method to write data to the output stream
14
+ ClassMethod write(data)
15
+ {
16
+ w data
17
+ }
18
+
19
+ /// Helper to build the environ
20
+ ClassMethod GetEnviron() As %SYS.Python
21
+ {
22
+ //set builtins
23
+ set builtins = ##class(%SYS.Python).Import("builtins")
24
+
25
+ //import dict to create environ
26
+ set dict = builtins.dict()
27
+
28
+ #dim %request As %CSP.Request
29
+
30
+ //set environ
31
+ do dict."__setitem__"("SERVER_NAME", $System.INetInfo.LocalHostName())
32
+ do dict."__setitem__"("SERVER_PORT", "")
33
+ do dict."__setitem__"("SERVER_PROTOCOL", "HTTP/1.1")
34
+ do dict."__setitem__"("SERVER_SOFTWARE", "IRIS")
35
+ do dict."__setitem__"("SCRIPT_NAME", ..#APPNAME)
36
+ do dict."__setitem__"("REQUEST_METHOD", %request.Method)
37
+ do dict."__setitem__"("CONTENT_TYPE", %request.ContentType)
38
+ do dict."__setitem__"("CHARSET", %request.CharSet)
39
+ Set app=$$getapp^%SYS.cspServer(%request.URL,.path,.match,.updatedurl)
40
+ do dict."__setitem__"("PATH_INFO", $extract(updatedurl,$length(path),*))
41
+
42
+ // to extract the query string
43
+
44
+ return dict
45
+ }
46
+
47
+ ClassMethod Page(skipheader As %Boolean = 1) As %Status [ Internal, ServerOnly = 1 ]
48
+ {
49
+ Try {
50
+ //set classpass
51
+ if ..#CLASSPATHS '="" {
52
+ set sys = ##class(%SYS.Python).Import("sys")
53
+ set delimiter = $s($system.Version.GetOS()="Windows":";",1:":")
54
+ set extraClasspaths = $tr(..#CLASSPATHS,delimiter,"|")
55
+ for i=1:1:$l(extraClasspaths,"|") {
56
+ set onePath = $p(extraClasspaths,"|",i)
57
+ set onePath = ##class(%File).NormalizeDirectory(onePath)
58
+ if onePath?1"$$IRISHOME"1P.E set onePath = $e($system.Util.InstallDirectory(),1,*-1)_$e(onePath,11,*)
59
+ if onePath'="" do sys.path.append(onePath)
60
+ }
61
+ }
62
+
63
+ //set environ
64
+ set environ = ..GetEnviron()
65
+
66
+ //import sys
67
+ set sys = ##class(%SYS.Python).Import("sys")
68
+
69
+ //set stdin
70
+ set builtins = ##class(%SYS.Python).Import("builtins")
71
+ set ba = builtins.bytearray()
72
+
73
+ while %request.Content.AtEnd = 0 {
74
+ do ba.extend(##class(%SYS.Python).Bytes(%request.Content.Read()))
75
+ }
76
+ //set handler
77
+ set handler = ##class(%SYS.Python).Import("grongier.pex.wsgi.handlers").IrisHandler(ba, sys.stdout, sys.stderr,environ)
78
+
79
+ //set module
80
+ set module = ##class(%SYS.Python).Import(..#MODULENAME)
81
+
82
+ //set builtins
83
+ set builtins = ##class(%SYS.Python).Import("builtins")
84
+
85
+ //set app
86
+ set application = builtins.getattr(module, ..#APPNAME)
87
+
88
+ //run app
89
+ do handler.run(application)
90
+
91
+ }
92
+ Catch ex {
93
+ return ex.AsStatus()
94
+ }
95
+
96
+ quit $$$OK
97
+ }
98
+
99
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iris-pex-embedded-python
3
- Version: 2.3.3
3
+ Version: 2.3.5
4
4
  Summary: iris_pex_embedded_python
5
5
  Home-page: https://github.com/grongierisc/interoperability-embedded-python
6
6
  Author: grongier
@@ -0,0 +1,42 @@
1
+ grongier/pex/__init__.py,sha256=nvcmRCxLy-lpL5GzlCKrmsSK8LF8Q0aKddx6ib8U50E,1166
2
+ grongier/pex/__main__.py,sha256=ebEYPDOBKiXOlmdI4onpQLzfBKU4wyfijYyquA5dWV4,107
3
+ grongier/pex/_business_host.py,sha256=01JsAKt4DMQ6X1IhNIUH5cgg38Hh9eKgPJUHY8qZi1c,20152
4
+ grongier/pex/_business_operation.py,sha256=W_B9Ci1fei8SGcElkAd13gV9S4BNKeQciTMVqxxJVZc,3509
5
+ grongier/pex/_business_process.py,sha256=qzt3FL3aqHhcOVR043zjYlHCET5ZRz_zNNdCbI7TXTE,12013
6
+ grongier/pex/_business_service.py,sha256=8CgpjcdVmv5747CTa3Lw3B48RYXq2SQN9qfdxvqEI5g,3735
7
+ grongier/pex/_cli.py,sha256=SJoEUQ8dTFDVZ0sQlmvGLSg0mzcOSW7hvOrS9G5g7f4,5647
8
+ grongier/pex/_common.py,sha256=yiJ-sH4ml5u9qEnZFX_4F-Rn2X6shtMhceJA9RCMChI,15158
9
+ grongier/pex/_director.py,sha256=0P1M6k2MaqViK-Mavfsu0RaI876HHPgarrUnA0a0ftA,8810
10
+ grongier/pex/_inbound_adapter.py,sha256=aQqRfyw69Iz6AaYzeTAbC_ERDvKadY3tSSC1LJCUVQg,1661
11
+ grongier/pex/_message.py,sha256=BmwBXriykU66bwAgRbdkMpjfJRVWoNRX2eDc9TXfXzA,325
12
+ grongier/pex/_outbound_adapter.py,sha256=HOxTSGwgQVDXzYpSMArLEmipPNYLxOCFaiN51MelFNA,735
13
+ grongier/pex/_pickle_message.py,sha256=noKfc2VkXufV3fqjKvNHN_oANQ1YN9ffCaSV0XSTAIE,331
14
+ grongier/pex/_private_session_duplex.py,sha256=Qj_xzwwFnFVwi_Sl7Q7nKk4zmL6UC8iqBAuwnz7mVX8,5033
15
+ grongier/pex/_private_session_process.py,sha256=_2r_csWcVRLmIUt4O0Y1Hg1FcX6A08lt9DvALQhwu8s,1722
16
+ grongier/pex/_utils.py,sha256=bzd3nmBTso6HKMzyZZERY5Ai_8DsJrU54kHBe0HMy_8,15325
17
+ grongier/pex/data/PEX/BusinessOperation.cls,sha256=qvLahHnQPAKMrGCekQNXPJgKPvlCWH5nJa0eYvceGvQ,932
18
+ grongier/pex/data/PEX/BusinessProcess.cls,sha256=-7REU1ny8QhQGS0zpB1ByUtbspTzmtZ1nZ9TiLFf48A,2719
19
+ grongier/pex/data/PEX/BusinessService.cls,sha256=2FXGkJ29zU3m-BcMVJTqD9skG9o7GvcHw60DAx4Fj3s,1039
20
+ grongier/pex/data/PEX/Common.cls,sha256=N1tioRUfh7fZqw7OqZul7vlpaHC9lXIQtczogmwtXFM,3538
21
+ grongier/pex/data/PEX/Director.cls,sha256=wImRl1P37_A-Om8ahl2hfl92hxicqKnKAqzHOE4L8wg,1894
22
+ grongier/pex/data/PEX/InboundAdapter.cls,sha256=j-6tQPzo3tWTq7HJNxDR-4cK3VGVG0o3zgzD5LzIa74,628
23
+ grongier/pex/data/PEX/Message.cls,sha256=tM5gkSdoCdssxAcX6mV4e3BoVgYBmNnNUsmAH_d-cHc,8227
24
+ grongier/pex/data/PEX/OutboundAdapter.cls,sha256=75AquKo4iZ7Hzzo2nVrh1Z4CnS8x-qPO-Q1HpgUZRQw,976
25
+ grongier/pex/data/PEX/PickleMessage.cls,sha256=M8Q5-BHddj6gnURYAGTlaNPB-o1JByycBrCKbpqfDLE,1691
26
+ grongier/pex/data/PEX/Test.cls,sha256=97xsKrV0KuaE-2V_vUsDLdV0VNCGp2BXKWSkuAjp628,1622
27
+ grongier/pex/data/PEX/Utils.cls,sha256=iZg3a7eHJ06579LTbeKtlM3qHJ2RSUskXTL8snSPbOc,13498
28
+ grongier/pex/data/PEX/WSGI.cls,sha256=hso1O3VVFWxAAO4C6zuuhgyqDw26EP0N3eMCVuEYAzk,2908
29
+ grongier/pex/data/PEX/Duplex/Operation.cls,sha256=bt6j7ZdhFyYfQAhNZEWoHtIYoOgOWqCb5s6VmlJjc4E,543
30
+ grongier/pex/data/PEX/Duplex/Process.cls,sha256=sLoYjHJHYNBx2kpEijvkIH1ZgMmUD_Pr7aUiguloxEs,7103
31
+ grongier/pex/data/PEX/Duplex/Service.cls,sha256=omgn16L2XfagAN8iZXXrlyNToRe5Af-kMBnjMzMigdo,179
32
+ grongier/pex/data/PEX/PrivateSession/Duplex.cls,sha256=w5Lx9gXKrOs4QOBJ7_eet5vWdpHMegddL5j43EaZwEE,8065
33
+ grongier/pex/data/PEX/PrivateSession/Message/Ack.cls,sha256=WbBn7pWj5mzruVfLpOAwzTW4JG44qDKHOSJq82_UgTc,986
34
+ grongier/pex/data/PEX/PrivateSession/Message/Poll.cls,sha256=2lj-e20AH7RR8UgGJaldrk-1kd8WjQJNPiH-duds_4A,987
35
+ grongier/pex/data/PEX/PrivateSession/Message/Start.cls,sha256=DAtq4DyRqFq2_4Isa0cZjjwuAzdHjsQu8wMppK4myzs,994
36
+ grongier/pex/data/PEX/PrivateSession/Message/Stop.cls,sha256=ofVKjrN6UPFasalrjPFWYNwlJ5IBlAE62IH8_U07c0g,1435
37
+ iris_pex_embedded_python-2.3.5.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
38
+ iris_pex_embedded_python-2.3.5.dist-info/METADATA,sha256=kYmIf8bh3L3MjdFQwkWmgSEVC3f-yc4JLIRxz_VfIuU,49500
39
+ iris_pex_embedded_python-2.3.5.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
40
+ iris_pex_embedded_python-2.3.5.dist-info/entry_points.txt,sha256=atkAtHoIuwXcZ0jl5gwof0l__ru_lt8WhVYk6HxYf70,47
41
+ iris_pex_embedded_python-2.3.5.dist-info/top_level.txt,sha256=IHTNyQ_h3DSfdFPl6yKfe3Flu-EfpykyfJi7jo-O6Vs,9
42
+ iris_pex_embedded_python-2.3.5.dist-info/RECORD,,
grongier/iris/__init__.py DELETED
File without changes
@@ -1,23 +0,0 @@
1
- grongier/iris/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- grongier/pex/__init__.py,sha256=nvcmRCxLy-lpL5GzlCKrmsSK8LF8Q0aKddx6ib8U50E,1166
3
- grongier/pex/__main__.py,sha256=ebEYPDOBKiXOlmdI4onpQLzfBKU4wyfijYyquA5dWV4,107
4
- grongier/pex/_business_host.py,sha256=01JsAKt4DMQ6X1IhNIUH5cgg38Hh9eKgPJUHY8qZi1c,20152
5
- grongier/pex/_business_operation.py,sha256=W_B9Ci1fei8SGcElkAd13gV9S4BNKeQciTMVqxxJVZc,3509
6
- grongier/pex/_business_process.py,sha256=WtO1RCZUKykaxUFocI1XmZmnSQzEOz_VFsVFytsOzFE,11838
7
- grongier/pex/_business_service.py,sha256=8CgpjcdVmv5747CTa3Lw3B48RYXq2SQN9qfdxvqEI5g,3735
8
- grongier/pex/_cli.py,sha256=94ZVqhdZWE80gV8BM0cEQ-eutioda2sfhWJn-lI46Xg,5320
9
- grongier/pex/_common.py,sha256=Mf3nX0Jf0YHPN72PeXIKd5kJbkz4N3xVqlGlEyL2DIM,15107
10
- grongier/pex/_director.py,sha256=0P1M6k2MaqViK-Mavfsu0RaI876HHPgarrUnA0a0ftA,8810
11
- grongier/pex/_inbound_adapter.py,sha256=aQqRfyw69Iz6AaYzeTAbC_ERDvKadY3tSSC1LJCUVQg,1661
12
- grongier/pex/_message.py,sha256=BmwBXriykU66bwAgRbdkMpjfJRVWoNRX2eDc9TXfXzA,325
13
- grongier/pex/_outbound_adapter.py,sha256=HOxTSGwgQVDXzYpSMArLEmipPNYLxOCFaiN51MelFNA,735
14
- grongier/pex/_pickle_message.py,sha256=noKfc2VkXufV3fqjKvNHN_oANQ1YN9ffCaSV0XSTAIE,331
15
- grongier/pex/_private_session_duplex.py,sha256=Qj_xzwwFnFVwi_Sl7Q7nKk4zmL6UC8iqBAuwnz7mVX8,5033
16
- grongier/pex/_private_session_process.py,sha256=_2r_csWcVRLmIUt4O0Y1Hg1FcX6A08lt9DvALQhwu8s,1722
17
- grongier/pex/_utils.py,sha256=7fqVgqM5fXCOnqw8CSayrHnl_VMejX9zXMm9SEKfvso,15120
18
- iris_pex_embedded_python-2.3.3.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
19
- iris_pex_embedded_python-2.3.3.dist-info/METADATA,sha256=ODdhlwRr-rTxBPUsdlgmdGInzMQuo5eMo0p-eKamo_s,49500
20
- iris_pex_embedded_python-2.3.3.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
21
- iris_pex_embedded_python-2.3.3.dist-info/entry_points.txt,sha256=atkAtHoIuwXcZ0jl5gwof0l__ru_lt8WhVYk6HxYf70,47
22
- iris_pex_embedded_python-2.3.3.dist-info/top_level.txt,sha256=IHTNyQ_h3DSfdFPl6yKfe3Flu-EfpykyfJi7jo-O6Vs,9
23
- iris_pex_embedded_python-2.3.3.dist-info/RECORD,,