wowool-sdk-cpp 3.6.0__tar.gz → 3.6.4__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.0 → wowool_sdk_cpp-3.6.4}/PKG-INFO +2 -2
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/pre_setup.py +3 -1
- wowool_sdk_cpp-3.6.4/sdk_version.txt +1 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/setup.py +6 -2
- wowool_sdk_cpp-3.6.4/version.txt +1 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool/native/core/wowool_sdk.cpp +37 -35
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool/package/lib/wowool_plugin.py +6 -3
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool/package/lib/wowool_sdk.py +5 -4
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool_sdk_cpp.egg-info/PKG-INFO +2 -2
- wowool_sdk_cpp-3.6.0/sdk_version.txt +0 -1
- wowool_sdk_cpp-3.6.0/version.txt +0 -1
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/MANIFEST.in +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/common_setup.py +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/install_requires.txt +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/install_requires_wowool.txt +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/long_description.md +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/pyproject.toml +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/setup.cfg +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool/plugin/wowool_plugin.cpp +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool/plugin/wowool_plugin.hpp +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool_sdk_cpp.egg-info/SOURCES.txt +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool_sdk_cpp.egg-info/dependency_links.txt +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool_sdk_cpp.egg-info/not-zip-safe +0 -0
- {wowool_sdk_cpp-3.6.0 → wowool_sdk_cpp-3.6.4}/wowool_sdk_cpp.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wowool-sdk-cpp
|
|
3
|
-
Version: 3.6.
|
|
4
|
-
Summary: Wowool NLP Toolkit C++ SDK Python Bindings
|
|
3
|
+
Version: 3.6.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
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -147,7 +147,8 @@ def prep_build_setup(wow_stage: Path):
|
|
|
147
147
|
|
|
148
148
|
platform_name = platform.system()
|
|
149
149
|
if "Windows" == platform_name:
|
|
150
|
-
icu_files = ["
|
|
150
|
+
icu_files = ["icudt77.dll", "icuuc77.dll"]
|
|
151
|
+
icu_lib_folder = stage_bin_folder
|
|
151
152
|
elif "Darwin" == platform_name:
|
|
152
153
|
icu_files = ["libicudata.dylib", "libicuuc.dylib"]
|
|
153
154
|
else:
|
|
@@ -196,6 +197,7 @@ def prep_build_setup(wow_stage: Path):
|
|
|
196
197
|
|
|
197
198
|
for fn in icu_files:
|
|
198
199
|
target_fn = package_lib_folder / fn
|
|
200
|
+
logger.info(f"!!!!! COPY ICU {icu_lib_folder} {fn} --> {target_fn}")
|
|
199
201
|
shutil.copy2(icu_lib_folder / fn, target_fn)
|
|
200
202
|
# remove_rpath(target_fn)
|
|
201
203
|
# set_rpath_origin(target_fn)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.3.1
|
|
@@ -332,10 +332,13 @@ class BuildExt(build_ext):
|
|
|
332
332
|
ct = self.compiler.compiler_type
|
|
333
333
|
opts = self.c_opts.get(ct, [])
|
|
334
334
|
link_opts = self.l_opts.get(ct, [])
|
|
335
|
+
print(f"!!!!!!!!!!! Compiler type: {ct}, opts: {opts}, link_opts: {link_opts}")
|
|
335
336
|
if ct == "unix":
|
|
336
337
|
opts.append(cpp_flag(self.compiler))
|
|
337
338
|
if has_flag(self.compiler, "-fvisibility=hidden"):
|
|
338
339
|
opts.append("-fvisibility=hidden")
|
|
340
|
+
elif ct == "msvc":
|
|
341
|
+
opts.append("/std:c++17")
|
|
339
342
|
|
|
340
343
|
for ext in self.extensions:
|
|
341
344
|
ext.define_macros = [("VERSION_INFO", '"{}"'.format(self.distribution.get_version()))]
|
|
@@ -404,6 +407,7 @@ def extension_modules():
|
|
|
404
407
|
library_dirs = [str(Path(WOWOOL_STAGE, "lib")), get_config_var("LIBDEST")]
|
|
405
408
|
libraries = ["wowool"]
|
|
406
409
|
plugin_libraries = libraries
|
|
410
|
+
extra_compile_args.extend(["/DWIN32"])
|
|
407
411
|
else:
|
|
408
412
|
runtime_library_dirs = [runtime_library_path]
|
|
409
413
|
extra_link_args = ["-Xlinker", "-rpath", "-Xlinker", get_origin_keyword(), "-static-libstdc++"]
|
|
@@ -486,11 +490,11 @@ install_requires = [
|
|
|
486
490
|
version = open("version.txt").read().strip()
|
|
487
491
|
|
|
488
492
|
|
|
489
|
-
|
|
493
|
+
setup(
|
|
490
494
|
name=package_name,
|
|
491
495
|
version=version,
|
|
492
496
|
author="Wowool",
|
|
493
|
-
description="Wowool NLP Toolkit C++ SDK Python Bindings",
|
|
497
|
+
description="Wowool NLP Toolkit C++ SDK Python Bindings, (use nlp-wowool-sdk instead if you want the Python SDK)",
|
|
494
498
|
long_description=long_description,
|
|
495
499
|
long_description_content_type="text/markdown",
|
|
496
500
|
setup_requires=["pybind11"],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.6.4
|
|
@@ -42,7 +42,7 @@ bool get_environment_bool(std::string const &env_id, bool default_value) {
|
|
|
42
42
|
char const *value_ptr = std::getenv(env_id.c_str());
|
|
43
43
|
if (value_ptr) {
|
|
44
44
|
std::string value(value_ptr);
|
|
45
|
-
return value == "true"
|
|
45
|
+
return value == "true" || value == "True";
|
|
46
46
|
}
|
|
47
47
|
return default_value;
|
|
48
48
|
}
|
|
@@ -117,6 +117,18 @@ wowool::common::Options convert_py_2_api_options(py::dict const &kwargs) {
|
|
|
117
117
|
return options;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
py::object resolve_license_key_provider(py::dict &kwargs) {
|
|
121
|
+
py::object license_key = py::none();
|
|
122
|
+
if (kwargs.contains("license_key_provider")) {
|
|
123
|
+
py::module pysdk =
|
|
124
|
+
py::module::import("wowool.native.core.lic_key_provider");
|
|
125
|
+
auto decode_license_key_provider =
|
|
126
|
+
pysdk.attr("decode_license_key_provider");
|
|
127
|
+
license_key = decode_license_key_provider(kwargs["license_key_provider"]);
|
|
128
|
+
}
|
|
129
|
+
return license_key; // py::object
|
|
130
|
+
}
|
|
131
|
+
|
|
120
132
|
std::string convert_filterset(wowool::filter::Filter const &filterset) {
|
|
121
133
|
return filterset.info();
|
|
122
134
|
}
|
|
@@ -158,26 +170,10 @@ public:
|
|
|
158
170
|
|
|
159
171
|
typedef wowool::engine::Engine type;
|
|
160
172
|
|
|
161
|
-
// using wowool::engine::Engine::Engine;
|
|
162
|
-
|
|
163
|
-
// engine_t(wowool::engine::Engine const &&base)
|
|
164
|
-
// : wowool::engine::Engine(std::move(base))
|
|
165
|
-
// {
|
|
166
|
-
// std::cout << "PLUGIN wowool::engine::Engine(wowool::engine::Engine const
|
|
167
|
-
// &&base)" << this << std::endl;
|
|
168
|
-
// }
|
|
169
|
-
|
|
170
|
-
// engine_t(wowool::engine::Engine const &&base, py::dict const &kwarg)
|
|
171
|
-
// : wowool::engine::Engine(tir::pywowool::convert_py_2_api_options(kwarg))
|
|
172
|
-
// {
|
|
173
|
-
// std::cout << "PLUGIN wowool::engine::Engine(wowool::engine::Engine const
|
|
174
|
-
// &&base, py::dict const &kwarg)" << this << std::endl;
|
|
175
|
-
// }
|
|
176
|
-
|
|
177
173
|
// we need this one to be able to create multi_process objects.
|
|
178
|
-
engine_t(py::dict const &
|
|
179
|
-
: wowool::engine::Engine(
|
|
180
|
-
|
|
174
|
+
engine_t(py::dict const &kwargs)
|
|
175
|
+
: wowool::engine::Engine(
|
|
176
|
+
tir::pywowool::convert_py_2_api_options(kwargs)) {}
|
|
181
177
|
};
|
|
182
178
|
|
|
183
179
|
class lid_t : public wowool::language_identifier::LanguageIdentifier {
|
|
@@ -189,14 +185,14 @@ public:
|
|
|
189
185
|
lid_t(wowool::language_identifier::LanguageIdentifier const &&base)
|
|
190
186
|
: wowool::language_identifier::LanguageIdentifier(std::move(base)) {}
|
|
191
187
|
|
|
192
|
-
lid_t(wowool::analyzer::Engine const &engine, py::dict const &
|
|
188
|
+
lid_t(wowool::analyzer::Engine const &engine, py::dict const &kwargs)
|
|
193
189
|
: wowool::language_identifier::LanguageIdentifier(
|
|
194
|
-
engine, tir::pywowool::convert_py_2_api_options(
|
|
190
|
+
engine, tir::pywowool::convert_py_2_api_options(kwargs)) {}
|
|
195
191
|
|
|
196
|
-
lid_t(py::dict const &
|
|
192
|
+
lid_t(py::dict const &kwargs)
|
|
197
193
|
: wowool::language_identifier::LanguageIdentifier(
|
|
198
194
|
tir::pywowool::get_default_engine(global_shared_engine_options),
|
|
199
|
-
tir::pywowool::convert_py_2_api_options(
|
|
195
|
+
tir::pywowool::convert_py_2_api_options(kwargs)) {}
|
|
200
196
|
};
|
|
201
197
|
|
|
202
198
|
class domain_t : public wowool::domain::Domain {
|
|
@@ -209,17 +205,17 @@ public:
|
|
|
209
205
|
: wowool::domain::Domain(std::move(base)) {}
|
|
210
206
|
|
|
211
207
|
domain_t(wowool::analyzer::Engine const &engine,
|
|
212
|
-
std::string const domain_descriptor, py::dict const &
|
|
213
|
-
: wowool::domain::Domain(
|
|
214
|
-
|
|
215
|
-
|
|
208
|
+
std::string const domain_descriptor, py::dict const &kwargs)
|
|
209
|
+
: wowool::domain::Domain(
|
|
210
|
+
engine, domain_descriptor,
|
|
211
|
+
tir::pywowool::convert_py_2_api_options(kwargs)) {}
|
|
216
212
|
|
|
217
213
|
// we need this one to be able to create multi_process objects.
|
|
218
|
-
domain_t(py::dict const &
|
|
214
|
+
domain_t(py::dict const &kwargs)
|
|
219
215
|
: wowool::domain::Domain(
|
|
220
216
|
tir::pywowool::get_default_engine(global_shared_engine_options),
|
|
221
|
-
|
|
222
|
-
tir::pywowool::convert_py_2_api_options(
|
|
217
|
+
kwargs["name"].cast<std::string>(),
|
|
218
|
+
tir::pywowool::convert_py_2_api_options(kwargs)) {}
|
|
223
219
|
|
|
224
220
|
// wowool::analyzer::Results process(wowool::analyzer::Results const document)
|
|
225
221
|
// {
|
|
@@ -278,10 +274,10 @@ public:
|
|
|
278
274
|
analyzer_t(wowool::analyzer::Analyzer const &&base)
|
|
279
275
|
: wowool::analyzer::Analyzer(std::move(base)) {}
|
|
280
276
|
|
|
281
|
-
analyzer_t(wowool::analyzer::Engine const &engine, py::dict const &
|
|
277
|
+
analyzer_t(wowool::analyzer::Engine const &engine, py::dict const &kwargs)
|
|
282
278
|
: wowool::analyzer::Analyzer(
|
|
283
|
-
engine, tir::pywowool::convert_py_2_api_options(
|
|
284
|
-
_kwargs(
|
|
279
|
+
engine, tir::pywowool::convert_py_2_api_options(kwargs)),
|
|
280
|
+
_kwargs(kwargs) {}
|
|
285
281
|
|
|
286
282
|
std::string
|
|
287
283
|
process_return_string(std::string const &document,
|
|
@@ -458,10 +454,16 @@ PYBIND11_MODULE(_wowool_sdk, m)
|
|
|
458
454
|
})
|
|
459
455
|
.def("__getstate__", [](wowool::engine::Engine const& self) {
|
|
460
456
|
py::dict kwargs = tir::pywowool::convert_options_2_py(self.options);
|
|
457
|
+
kwargs.attr("pop")("license_key", py::none());
|
|
461
458
|
return kwargs;
|
|
462
459
|
})
|
|
463
460
|
.def("__setstate__", [](py::object self, py::dict kwargs) {
|
|
464
|
-
|
|
461
|
+
auto license_key = tir::pywowool::resolve_license_key_provider(kwargs);
|
|
462
|
+
if (!license_key.is_none()) {
|
|
463
|
+
std::string value = py::str(license_key);
|
|
464
|
+
if (value.length() > 0)
|
|
465
|
+
kwargs["license_key"] = license_key;
|
|
466
|
+
}
|
|
465
467
|
auto& p = self.cast<tir::pywowool::engine_t&>();
|
|
466
468
|
new (&p) tir::pywowool::engine_t(kwargs);
|
|
467
469
|
})
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
import os
|
|
3
3
|
import sys
|
|
4
|
+
from platform import system
|
|
4
5
|
|
|
5
6
|
if "WOWOOL_ROOT" in os.environ:
|
|
6
7
|
WOWOOL_ROOT = os.environ["WOWOOL_ROOT"]
|
|
7
8
|
expanded_wowool_root = Path(WOWOOL_ROOT).expanduser().resolve()
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if platform.system() == "Windows":
|
|
9
|
+
|
|
10
|
+
if system() == "Windows":
|
|
11
11
|
WOWOOL_LIB = expanded_wowool_root / "bin"
|
|
12
12
|
if str(WOWOOL_LIB) not in sys.path:
|
|
13
13
|
sys.path.append(str(WOWOOL_LIB))
|
|
@@ -19,4 +19,7 @@ else:
|
|
|
19
19
|
if str(WOWOOL_LIB) not in sys.path:
|
|
20
20
|
sys.path.append(str(WOWOOL_LIB))
|
|
21
21
|
|
|
22
|
+
if system() == "Windows":
|
|
23
|
+
os.add_dll_directory(str(WOWOOL_LIB))
|
|
24
|
+
|
|
22
25
|
from _wowool_plugin import * # noqa: F401, F403
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
import os
|
|
3
3
|
import sys
|
|
4
|
-
|
|
4
|
+
from platform import system
|
|
5
5
|
|
|
6
6
|
if "WOWOOL_ROOT" in os.environ:
|
|
7
7
|
WOWOOL_ROOT = os.environ["WOWOOL_ROOT"]
|
|
8
8
|
expanded_wowool_root = Path(WOWOOL_ROOT).expanduser().resolve()
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if platform.system() == "Windows":
|
|
9
|
+
|
|
10
|
+
if system() == "Windows":
|
|
12
11
|
WOWOOL_LIB = expanded_wowool_root / "bin"
|
|
13
12
|
if str(WOWOOL_LIB) not in sys.path:
|
|
14
13
|
sys.path.append(str(WOWOOL_LIB))
|
|
@@ -20,6 +19,8 @@ else:
|
|
|
20
19
|
if str(WOWOOL_LIB) not in sys.path:
|
|
21
20
|
sys.path.append(str(WOWOOL_LIB))
|
|
22
21
|
|
|
22
|
+
if system() == "Windows":
|
|
23
|
+
os.add_dll_directory(str(WOWOOL_LIB))
|
|
23
24
|
|
|
24
25
|
from _wowool_sdk import * # noqa
|
|
25
26
|
from _wowool_sdk import (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wowool-sdk-cpp
|
|
3
|
-
Version: 3.6.
|
|
4
|
-
Summary: Wowool NLP Toolkit C++ SDK Python Bindings
|
|
3
|
+
Version: 3.6.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
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.2.0
|
wowool_sdk_cpp-3.6.0/version.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.6.0
|
|
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
|