yamlscript 0.2.21__tar.gz → 0.2.22__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.
- {yamlscript-0.2.21/lib/yamlscript.egg-info → yamlscript-0.2.22}/PKG-INFO +1 -1
- {yamlscript-0.2.21 → yamlscript-0.2.22}/lib/yamlscript/__init__.py +24 -18
- {yamlscript-0.2.21 → yamlscript-0.2.22/lib/yamlscript.egg-info}/PKG-INFO +1 -1
- {yamlscript-0.2.21 → yamlscript-0.2.22}/setup.py +2 -1
- {yamlscript-0.2.21 → yamlscript-0.2.22}/.long_description.md +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/MANIFEST.in +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/ReadMe.md +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/lib/yamlscript.egg-info/SOURCES.txt +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/lib/yamlscript.egg-info/dependency_links.txt +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/lib/yamlscript.egg-info/requires.txt +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/lib/yamlscript.egg-info/top_level.txt +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/setup.cfg +0 -0
- {yamlscript-0.2.21 → yamlscript-0.2.22}/test/test.py +0 -0
|
@@ -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 libys.
|
|
19
|
-
yamlscript_version = '0.2.
|
|
19
|
+
yamlscript_version = '0.2.22'
|
|
20
20
|
|
|
21
21
|
import os, sys
|
|
22
22
|
import ctypes
|
|
@@ -30,39 +30,45 @@ assert sys.version_info >= (3, 6), \
|
|
|
30
30
|
# Find the libys shared library file path:
|
|
31
31
|
def find_libys_path():
|
|
32
32
|
# We currently only support platforms that GraalVM supports.
|
|
33
|
-
# And Windows is not yet implemented...
|
|
34
33
|
# Confirm platform and determine file extension:
|
|
35
34
|
if sys.platform == 'linux':
|
|
36
|
-
|
|
35
|
+
libys_name = \
|
|
36
|
+
"libys.so.%s" % yamlscript_version
|
|
37
37
|
elif sys.platform == 'darwin':
|
|
38
|
-
|
|
38
|
+
libys_name = \
|
|
39
|
+
"libys.dylib.%s" % yamlscript_version
|
|
40
|
+
elif sys.platform == 'win32':
|
|
41
|
+
libys_name = 'libys.dll'
|
|
39
42
|
else:
|
|
40
43
|
raise Exception(
|
|
41
44
|
"Unsupported platform '%s' for yamlscript." % sys.platform)
|
|
42
45
|
|
|
43
46
|
# We currently bind to an exact version of libys.
|
|
44
|
-
# eg 'libys.so.0.2.
|
|
45
|
-
libys_name = \
|
|
46
|
-
"libys.%s.%s" % (so, yamlscript_version)
|
|
47
|
-
|
|
47
|
+
# eg 'libys.so.0.2.22'
|
|
48
48
|
# First look for the shared library bundled in platform wheels.
|
|
49
49
|
bundled_path = \
|
|
50
50
|
Path(__file__).resolve().parent / 'libys' / libys_name
|
|
51
51
|
if bundled_path.is_file():
|
|
52
52
|
return str(bundled_path)
|
|
53
53
|
|
|
54
|
-
# Then use
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
# Then use the platform library path plus common install locations.
|
|
55
|
+
if sys.platform == 'win32':
|
|
56
|
+
library_path = os.environ.get('PATH')
|
|
57
|
+
library_paths = library_path.split(os.pathsep) if library_path else []
|
|
58
|
+
else:
|
|
59
|
+
library_path = os.environ.get('LD_LIBRARY_PATH')
|
|
60
|
+
library_paths = library_path.split(os.pathsep) if library_path else []
|
|
61
|
+
library_paths.append('/usr/local/lib')
|
|
62
|
+
|
|
63
|
+
home = os.environ.get('HOME') or os.path.expanduser('~')
|
|
64
|
+
if home:
|
|
65
|
+
library_paths.append(os.path.join(home, '.local', 'lib'))
|
|
60
66
|
|
|
61
67
|
libys_path = None
|
|
62
|
-
for path in
|
|
63
|
-
|
|
64
|
-
if os.path.isfile(
|
|
65
|
-
libys_path =
|
|
68
|
+
for path in library_paths:
|
|
69
|
+
full_path = os.path.join(path, libys_name)
|
|
70
|
+
if os.path.isfile(full_path):
|
|
71
|
+
libys_path = full_path
|
|
66
72
|
break
|
|
67
73
|
|
|
68
74
|
if not libys_path:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pathlib
|
|
2
2
|
from setuptools import setup
|
|
3
3
|
|
|
4
|
-
version = '0.2.
|
|
4
|
+
version = '0.2.22'
|
|
5
5
|
|
|
6
6
|
root = pathlib.Path(__file__).parent.resolve()
|
|
7
7
|
|
|
@@ -43,6 +43,7 @@ setup(
|
|
|
43
43
|
'yamlscript': [
|
|
44
44
|
'libys/libys.so.*',
|
|
45
45
|
'libys/libys.dylib.*',
|
|
46
|
+
'libys/libys.dll',
|
|
46
47
|
],
|
|
47
48
|
},
|
|
48
49
|
cmdclass = cmdclass,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|