yamlscript 0.1.47__tar.gz → 0.1.48__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yamlscript
3
- Version: 0.1.47
3
+ Version: 0.1.48
4
4
  Summary: Program in YAML
5
5
  Home-page: https://github.com/ingydotnet/yamlscript
6
6
  Author: Ingy döt Net
@@ -16,7 +16,7 @@ object that the YAMLScript code evaluates to.
16
16
  # This value is automatically updated by 'make bump'.
17
17
  # The version number is used to find the correct shared library file.
18
18
  # We currently only support binding to an exact version of libyamlscript.
19
- yamlscript_version = '0.1.47'
19
+ yamlscript_version = '0.1.48'
20
20
 
21
21
  import os, sys
22
22
  import ctypes
@@ -60,7 +60,11 @@ def find_libyamlscript_path():
60
60
 
61
61
  if not libyamlscript_path:
62
62
  raise Exception(
63
- "Shared library file '%s' not found." % libyamlscript_name)
63
+ """\
64
+ Shared library file '%s' not found
65
+ Try: curl -sSL yamlscript.org/install | VERSION=%s LIB=1 bash
66
+ See: https://github.com/yaml/yamlscript/wiki/Installing-YAMLScript
67
+ """ % (libyamlscript_name, yamlscript_version))
64
68
 
65
69
  return libyamlscript_path
66
70
 
@@ -92,12 +96,15 @@ class YAMLScript():
92
96
  self.isolatethread = ctypes.c_void_p()
93
97
 
94
98
  # Create a new GraalVM isolate:
95
- libyamlscript.graal_create_isolate(
99
+ rc = libyamlscript.graal_create_isolate(
96
100
  None,
97
101
  None,
98
102
  ctypes.byref(self.isolatethread),
99
103
  )
100
104
 
105
+ if rc != 0:
106
+ raise Exception("Failed to create isolate")
107
+
101
108
  # Compile and eval a YAMLScript string and return the result:
102
109
  def load(self, input):
103
110
  # Reset any previous error:
@@ -128,6 +135,6 @@ class YAMLScript():
128
135
  # YAMLScript instance destructor:
129
136
  def __del__(self):
130
137
  # Tear down the isolate thread to free resources:
131
- ret = libyamlscript.graal_tear_down_isolate(self.isolatethread)
132
- if ret != 0:
133
- raise Exception("Failed to tear down isolate.")
138
+ rc = libyamlscript.graal_tear_down_isolate(self.isolatethread)
139
+ if rc != 0:
140
+ raise Exception("Failed to tear down isolate")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yamlscript
3
- Version: 0.1.47
3
+ Version: 0.1.48
4
4
  Summary: Program in YAML
5
5
  Home-page: https://github.com/ingydotnet/yamlscript
6
6
  Author: Ingy döt Net
@@ -1,4 +1,4 @@
1
- version = '0.1.47'
1
+ version = '0.1.48'
2
2
 
3
3
  from setuptools import setup
4
4
  import pathlib
File without changes
File without changes
File without changes
File without changes