wowool-sdk-cpp 3.7.0__tar.gz → 3.7.1__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.7.0 → wowool_sdk_cpp-3.7.1}/PKG-INFO +1 -1
  2. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/setup.py +34 -7
  3. wowool_sdk_cpp-3.7.1/version.txt +1 -0
  4. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/PKG-INFO +1 -1
  5. wowool_sdk_cpp-3.7.0/version.txt +0 -1
  6. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/MANIFEST.in +0 -0
  7. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/common_setup.py +0 -0
  8. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/install_requires.txt +0 -0
  9. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/install_requires_wowool.txt +0 -0
  10. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/long_description.md +0 -0
  11. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/pre_setup.py +0 -0
  12. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/pyproject.toml +0 -0
  13. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/sdk_version.txt +0 -0
  14. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/setup.cfg +0 -0
  15. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool/native/core/wowool_sdk.cpp +0 -0
  16. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool/package/lib/wowool_plugin.py +0 -0
  17. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool/package/lib/wowool_sdk.py +0 -0
  18. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool/plugin/wowool_plugin.cpp +0 -0
  19. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool/plugin/wowool_plugin.hpp +0 -0
  20. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/SOURCES.txt +0 -0
  21. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/dependency_links.txt +0 -0
  22. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/not-zip-safe +0 -0
  23. {wowool_sdk_cpp-3.7.0 → wowool_sdk_cpp-3.7.1}/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.7.0
3
+ Version: 3.7.1
4
4
  Summary: Wowool NLP Toolkit C++ SDK Python Bindings, (use nlp-wowool-sdk instead if you want the Python SDK)
5
5
  Author: Wowool
6
6
  Requires-Python: >=3.11
@@ -8,7 +8,8 @@ import platform
8
8
  from setuptools import setup, Extension
9
9
  import logging
10
10
  import sys
11
- from subprocess import run
11
+ import tarfile
12
+ import zipfile
12
13
  from setuptools.command.build_py import build_py as _build_py
13
14
 
14
15
  logger = logging.getLogger(__name__)
@@ -143,13 +144,13 @@ def download_raw(version: str, file_name: str, output_path: Path):
143
144
  # release_resp = requests.get(release_url, headers=headers)
144
145
  release_resp.raise_for_status()
145
146
  release_data = release_resp.json()
146
- print(f"📦 Found release: {release_data['name']} (ID: {release_data['id']})")
147
+ print(f"Found release: {release_data['name']} (ID: {release_data['id']})")
147
148
 
148
149
  asset_url = None
149
150
  for asset in release_data.get("assets", []):
150
151
  if asset["name"] == file_name:
151
152
  asset_url = asset["browser_download_url"]
152
- print(f"📄 Found asset: {file_name}")
153
+ print(f"Found asset: {file_name}")
153
154
  break
154
155
 
155
156
  if not asset_url:
@@ -172,7 +173,7 @@ def download_raw(version: str, file_name: str, output_path: Path):
172
173
  for chunk in download_resp.iter_content(chunk_size=8192):
173
174
  f.write(chunk)
174
175
 
175
- print(f"✅ Downloaded {file_name} to {output_path}")
176
+ print(f"Downloaded {file_name} to {output_path}")
176
177
  return output_path
177
178
 
178
179
 
@@ -191,13 +192,39 @@ def get_site_packages_dir():
191
192
 
192
193
  def extract_archive(file_path, archive_folder):
193
194
  import shutil
195
+ from pathlib import PurePosixPath
194
196
 
195
197
  if archive_folder.is_dir():
196
198
  shutil.rmtree(str(archive_folder))
197
- archive_folder.mkdir()
199
+ archive_folder.mkdir(parents=True, exist_ok=True)
200
+
201
+ if zipfile.is_zipfile(file_path):
202
+ with zipfile.ZipFile(file_path) as archive:
203
+ names = [n for n in archive.namelist() if n and not n.endswith("/")]
204
+ root = archive_folder.resolve()
205
+ for name in names:
206
+ # drop the top-level folder (wow-sdk/, wow/), like the tar branch does
207
+ parts = PurePosixPath(name).parts[1:]
208
+ if not parts:
209
+ continue
210
+ target = (archive_folder.joinpath(*parts)).resolve()
211
+ if root not in target.parents:
212
+ raise RuntimeError(f"Unsafe path in archive: {name}")
213
+ target.parent.mkdir(parents=True, exist_ok=True)
214
+ with archive.open(name) as src, open(target, "wb") as dst:
215
+ shutil.copyfileobj(src, dst)
216
+ return
217
+
218
+ with tarfile.open(file_path, "r:*") as archive:
219
+ members = []
220
+ for member in archive.getmembers():
221
+ path_parts = PurePosixPath(member.name).parts
222
+ if len(path_parts) <= 1 or PurePosixPath(member.name).name.startswith("._"):
223
+ continue
224
+ member.name = str(PurePosixPath(*path_parts[1:]))
225
+ members.append(member)
226
+ archive.extractall(path=archive_folder, members=members, filter="data")
198
227
 
199
- cmd = f"tar -xvf {file_path} -C {str(archive_folder)} --strip-components=1"
200
- run(cmd, shell=True, check=True)
201
228
  for fn in archive_folder.glob("**/*"):
202
229
  print(f"[WOWOOL] - {fn}")
203
230
 
@@ -0,0 +1 @@
1
+ 3.7.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wowool-sdk-cpp
3
- Version: 3.7.0
3
+ Version: 3.7.1
4
4
  Summary: Wowool NLP Toolkit C++ SDK Python Bindings, (use nlp-wowool-sdk instead if you want the Python SDK)
5
5
  Author: Wowool
6
6
  Requires-Python: >=3.11
@@ -1 +0,0 @@
1
- 3.7.0
File without changes