wowool-sdk-cpp 3.6.6__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.
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/PKG-INFO +1 -1
- wowool_sdk_cpp-3.7.1/sdk_version.txt +1 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/setup.py +34 -7
- wowool_sdk_cpp-3.7.1/version.txt +1 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/PKG-INFO +1 -1
- wowool_sdk_cpp-3.6.6/sdk_version.txt +0 -1
- wowool_sdk_cpp-3.6.6/version.txt +0 -1
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/MANIFEST.in +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/common_setup.py +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/install_requires.txt +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/install_requires_wowool.txt +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/long_description.md +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/pre_setup.py +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/pyproject.toml +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/setup.cfg +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool/native/core/wowool_sdk.cpp +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool/package/lib/wowool_plugin.py +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool/package/lib/wowool_sdk.py +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool/plugin/wowool_plugin.cpp +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool/plugin/wowool_plugin.hpp +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/SOURCES.txt +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/dependency_links.txt +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/not-zip-safe +0 -0
- {wowool_sdk_cpp-3.6.6 → wowool_sdk_cpp-3.7.1}/wowool_sdk_cpp.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.1
|
|
@@ -8,7 +8,8 @@ import platform
|
|
|
8
8
|
from setuptools import setup, Extension
|
|
9
9
|
import logging
|
|
10
10
|
import sys
|
|
11
|
-
|
|
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"
|
|
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"
|
|
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"
|
|
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 +0,0 @@
|
|
|
1
|
-
3.3.2
|
wowool_sdk_cpp-3.6.6/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.6.6
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|