wowool-sdk-cpp 3.5.5__tar.gz → 3.5.6__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.
Files changed (23) hide show
  1. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/PKG-INFO +1 -1
  2. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/common_setup.py +60 -5
  3. wowool_sdk_cpp-3.5.6/version.txt +1 -0
  4. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool_sdk_cpp.egg-info/PKG-INFO +1 -1
  5. wowool_sdk_cpp-3.5.5/version.txt +0 -1
  6. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/MANIFEST.in +0 -0
  7. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/install_requires.txt +0 -0
  8. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/install_requires_wowool.txt +0 -0
  9. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/long_description.md +0 -0
  10. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/pre_setup.py +0 -0
  11. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/pyproject.toml +0 -0
  12. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/sdk_version.txt +0 -0
  13. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/setup.cfg +0 -0
  14. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/setup.py +0 -0
  15. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool/native/core/wowool_sdk.cpp +0 -0
  16. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool/package/lib/wowool_plugin.py +0 -0
  17. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool/package/lib/wowool_sdk.py +0 -0
  18. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool/plugin/wowool_plugin.cpp +0 -0
  19. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool/plugin/wowool_plugin.hpp +0 -0
  20. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool_sdk_cpp.egg-info/SOURCES.txt +0 -0
  21. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool_sdk_cpp.egg-info/dependency_links.txt +0 -0
  22. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool_sdk_cpp.egg-info/not-zip-safe +0 -0
  23. {wowool_sdk_cpp-3.5.5 → wowool_sdk_cpp-3.5.6}/wowool_sdk_cpp.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wowool-sdk-cpp
3
- Version: 3.5.5
3
+ Version: 3.5.6
4
4
  Summary: Wowool NLP Toolkit C++ SDK Python Bindings
5
5
  Author: Wowool
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,8 @@
1
1
  from pathlib import Path
2
2
  import os
3
+ import platform
3
4
  import shutil
5
+ from dataclasses import dataclass
4
6
 
5
7
 
6
8
  def copy_with_lnk(src, dst):
@@ -46,22 +48,75 @@ def copy_with_lnk(src, dst):
46
48
  shutil.copy2(src, dst)
47
49
 
48
50
 
51
+ pi = platform.system()
52
+ if pi == "Windows":
53
+ NATIVE_SO_EXT = ".dll"
54
+ elif pi == "Darwin":
55
+ NATIVE_SO_EXT = ".dylib"
56
+ else:
57
+ NATIVE_SO_EXT = ".so"
58
+
59
+
60
+ @dataclass
61
+ class CopyInfo:
62
+ source: str
63
+ target: str | None = None
64
+ use_glob: bool = False
65
+
66
+
67
+ def copy_file_collection(files: list[CopyInfo], source_folder: Path, target_folder: Path):
68
+ """
69
+ Copy a collection of files from source_folder to target_folder
70
+ """
71
+ for file_info in files:
72
+ if file_info.use_glob:
73
+ pattern = file_info.source
74
+ for fn in source_folder.glob(pattern):
75
+ target_fn = target_folder / fn.name
76
+ print(f"Copying (glob) {fn} --> {target_fn}")
77
+ copy_with_lnk(fn, target_fn)
78
+ else:
79
+ source_fn = source_folder / file_info.source
80
+ target_name = file_info.target if file_info.target else file_info.source
81
+ target_fn = target_folder / target_name
82
+ print(f"Copying {source_fn} --> {target_fn}")
83
+ copy_with_lnk(source_fn, target_fn)
84
+
85
+
49
86
  def copy_to_package_folder(site_packages: Path, wow_sdk_folder: Path, bin_folders: Path, inc_folders: Path, lib_folders: Path):
50
87
  """
51
88
  Copy the files to the package folder
52
89
  """
53
90
  print(f"[WOW] site_packages: {site_packages=}")
91
+
54
92
  try:
55
93
  wowool_package_lib = site_packages / "wowool" / "package" / "lib"
56
94
  print(f"[WOW] wowool_package_lib: {wowool_package_lib=}")
57
95
  wowool_package_lib.mkdir(parents=True, exist_ok=True)
58
96
 
59
- for fn in bin_folders.glob("*"):
60
- print(f"[WOW] bin: {fn.name}")
61
- copy_with_lnk(fn, wowool_package_lib / fn.name)
97
+ if platform.system() != "Windows":
98
+ wowool_package_bin = wowool_package_lib
99
+ bin_files = [
100
+ CopyInfo("wow", "wow++"),
101
+ CopyInfo("woc", "woc++"),
102
+ CopyInfo("afst", "afst++"),
103
+ ]
104
+ lib_files = [
105
+ CopyInfo("_wowool_plugin*", use_glob=True),
106
+ CopyInfo("_wowool_sdk*", use_glob=True),
107
+ CopyInfo(f"libboost_regex{NATIVE_SO_EXT}"),
108
+ CopyInfo(f"libicudata{NATIVE_SO_EXT}"),
109
+ CopyInfo(f"libicuuc{NATIVE_SO_EXT}"),
110
+ CopyInfo(f"libwowool.*{NATIVE_SO_EXT}", use_glob=True),
111
+ CopyInfo(f"libwowool{NATIVE_SO_EXT}"),
112
+ ]
113
+ else:
114
+ raise NotImplementedError("Windows is not supported in this function yet")
62
115
 
63
- for fn in lib_folders.glob("*"):
64
- copy_with_lnk(fn, wowool_package_lib / fn.name)
116
+ print(f"[WOW] {bin_files=} {bin_folders=}, {wowool_package_lib=}")
117
+ copy_file_collection(bin_files, bin_folders, wowool_package_bin)
118
+ print(f"[WOW] {lib_files=} {lib_folders=}, {wowool_package_lib=}")
119
+ copy_file_collection(lib_files, lib_folders, wowool_package_lib)
65
120
 
66
121
  print(f"[WOW] Folders : WOWOOL_STAGE: {wow_sdk_folder=} {inc_folders=} {lib_folders=}")
67
122
  if lib_folders.exists() and inc_folders.exists():
@@ -0,0 +1 @@
1
+ 3.5.6
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wowool-sdk-cpp
3
- Version: 3.5.5
3
+ Version: 3.5.6
4
4
  Summary: Wowool NLP Toolkit C++ SDK Python Bindings
5
5
  Author: Wowool
6
6
  Requires-Python: >=3.11
@@ -1 +0,0 @@
1
- 3.5.5
File without changes
File without changes