yamlscript 0.2.18__tar.gz → 0.2.20__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.4
2
2
  Name: yamlscript
3
- Version: 0.2.18
3
+ Version: 0.2.20
4
4
  Summary: Program in YAML — Code is Data
5
5
  Home-page: https://github.com/ingydotnet/yamlscript
6
6
  Author: Ingy döt Net
@@ -16,11 +16,12 @@ 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.18'
19
+ yamlscript_version = '0.2.20'
20
20
 
21
21
  import os, sys
22
22
  import ctypes
23
23
  import json
24
+ from pathlib import Path
24
25
 
25
26
  # Require Python 3.6 or greater:
26
27
  assert sys.version_info >= (3, 6), \
@@ -40,12 +41,18 @@ def find_libys_path():
40
41
  "Unsupported platform '%s' for yamlscript." % sys.platform)
41
42
 
42
43
  # We currently bind to an exact version of libys.
43
- # eg 'libys.so.0.2.18'
44
+ # eg 'libys.so.0.2.20'
44
45
  libys_name = \
45
46
  "libys.%s.%s" % (so, yamlscript_version)
46
47
 
47
- # Use LD_LIBRARY_PATH to find libys shared library, or default to
48
- # '/usr/local/lib' (where it is installed by default):
48
+ # First look for the shared library bundled in platform wheels.
49
+ bundled_path = \
50
+ Path(__file__).resolve().parent / 'libys' / libys_name
51
+ if bundled_path.is_file():
52
+ return str(bundled_path)
53
+
54
+ # Then use LD_LIBRARY_PATH to find libys shared library, or default
55
+ # to '/usr/local/lib' (where it is installed by default):
49
56
  ld_library_path = os.environ.get('LD_LIBRARY_PATH')
50
57
  ld_library_paths = ld_library_path.split(':') if ld_library_path else []
51
58
  ld_library_paths.append('/usr/local/lib')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yamlscript
3
- Version: 0.2.18
3
+ Version: 0.2.20
4
4
  Summary: Program in YAML — Code is Data
5
5
  Home-page: https://github.com/ingydotnet/yamlscript
6
6
  Author: Ingy döt Net
@@ -1,7 +1,7 @@
1
- version = '0.2.18'
2
-
3
- from setuptools import setup
4
1
  import pathlib
2
+ from setuptools import setup
3
+
4
+ version = '0.2.20'
5
5
 
6
6
  root = pathlib.Path(__file__).parent.resolve()
7
7
 
@@ -9,6 +9,24 @@ long_description = \
9
9
  (root / '.long_description.md') \
10
10
  .read_text(encoding='utf-8')
11
11
 
12
+ cmdclass = {}
13
+
14
+ try:
15
+ from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
16
+
17
+ class bdist_wheel(_bdist_wheel):
18
+ def finalize_options(self):
19
+ _bdist_wheel.finalize_options(self)
20
+ self.root_is_pure = False
21
+
22
+ def get_tag(self):
23
+ python, abi, plat = _bdist_wheel.get_tag(self)
24
+ return 'py3', 'none', plat
25
+
26
+ cmdclass['bdist_wheel'] = bdist_wheel
27
+ except ImportError:
28
+ pass
29
+
12
30
  setup(
13
31
  name = 'yamlscript',
14
32
  version = version,
@@ -21,14 +39,18 @@ setup(
21
39
 
22
40
  packages = ['yamlscript'],
23
41
  package_dir = {'': 'lib'},
42
+ package_data = {
43
+ 'yamlscript': [
44
+ 'libys/libys.so.*',
45
+ 'libys/libys.dylib.*',
46
+ ],
47
+ },
48
+ cmdclass = cmdclass,
24
49
 
25
50
  python_requires = '>=3.6, <4',
26
51
  install_requires = [
27
52
  'pyyaml',
28
53
  ],
29
- setup_requires = [
30
- 'wheel',
31
- ],
32
54
 
33
55
  keywords = ['yaml', 'language'],
34
56
  classifiers = [
File without changes
File without changes
File without changes
File without changes