Skip to content

Commit 8b7aae2

Browse files
committed
[ENH] spm-specific Runtime class
1 parent dafa5e8 commit 8b7aae2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

spm/_runtime.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from mpython.runtime import Runtime as RuntimeBase
2+
3+
4+
class Runtime(RuntimeBase):
5+
"""
6+
Runtime specialization that imports the correct CTF.
7+
"""
8+
9+
@classmethod
10+
def _import_runtime(cls):
11+
import spm_runtime
12+
return spm_runtime
13+
14+
15+
class RuntimeMixin:
16+
"""
17+
Mixin that SPM classes must inherit so that they can call the
18+
correct runtime.
19+
"""
20+
21+
@classmethod
22+
def _runtime(cls):
23+
return Runtime

0 commit comments

Comments
 (0)