aspose-html-net 24.7.0__py3-none-win_amd64.whl → 24.8.0__py3-none-win_amd64.whl
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.
- aspose/__init__.py +75 -132
- aspose/assemblies/html/Aspose.HTML.dll +0 -0
- aspose/assemblies/html/WrpInterop.Aspose.Html.dll +0 -0
- aspose/assemblies/pycore/WrpInterop.Aspose.PyCore.dll +0 -0
- aspose/assemblies/pydrawing/WrpInterop.Aspose.PyDrawing.dll +0 -0
- aspose/assemblies/pygc/Aspose.PyGC.dll +0 -0
- aspose/assemblies/pyreflection/WrpInterop.Aspose.PyReflection.dll +0 -0
- aspose/html/__nuitka/__init__.pyi +1 -0
- aspose/html/__nuitka/aspose-html.nuitka-package.config.yml +19 -0
- aspose/html/drawing/__init__.pyi +511 -35
- aspose/html/rendering/__init__.pyi +69 -73
- aspose/html/rendering/doc/__init__.pyi +5 -5
- aspose/html/rendering/image/__init__.pyi +19 -88
- aspose/html/rendering/pdf/__init__.pyi +18 -88
- aspose/html/rendering/xps/__init__.pyi +21 -89
- aspose/html/toolkit/markdown/syntax/__init__.pyi +1 -1
- aspose/html.cp310-win_amd64.pyd +0 -0
- aspose/html.cp311-win_amd64.pyd +0 -0
- aspose/html.cp35-win_amd64.pyd +0 -0
- aspose/html.cp36-win_amd64.pyd +0 -0
- aspose/html.cp37-win_amd64.pyd +0 -0
- aspose/html.cp38-win_amd64.pyd +0 -0
- aspose/html.cp39-win_amd64.pyd +0 -0
- aspose/netcore/netcore3.1/aspose.embed.coreclrwrap.dll +0 -0
- aspose/pycore.cp310-win_amd64.pyd +0 -0
- aspose/pycore.cp311-win_amd64.pyd +0 -0
- aspose/pycore.cp35-win_amd64.pyd +0 -0
- aspose/pycore.cp36-win_amd64.pyd +0 -0
- aspose/pycore.cp37-win_amd64.pyd +0 -0
- aspose/pycore.cp38-win_amd64.pyd +0 -0
- aspose/pycore.cp39-win_amd64.pyd +0 -0
- aspose/pydrawing.cp310-win_amd64.pyd +0 -0
- aspose/pydrawing.cp311-win_amd64.pyd +0 -0
- aspose/pydrawing.cp35-win_amd64.pyd +0 -0
- aspose/pydrawing.cp36-win_amd64.pyd +0 -0
- aspose/pydrawing.cp37-win_amd64.pyd +0 -0
- aspose/pydrawing.cp38-win_amd64.pyd +0 -0
- aspose/pydrawing.cp39-win_amd64.pyd +0 -0
- aspose/pygc.cp310-win_amd64.pyd +0 -0
- aspose/pygc.cp311-win_amd64.pyd +0 -0
- aspose/pygc.cp35-win_amd64.pyd +0 -0
- aspose/pygc.cp36-win_amd64.pyd +0 -0
- aspose/pygc.cp37-win_amd64.pyd +0 -0
- aspose/pygc.cp38-win_amd64.pyd +0 -0
- aspose/pygc.cp39-win_amd64.pyd +0 -0
- aspose/pyreflection.cp310-win_amd64.pyd +0 -0
- aspose/pyreflection.cp311-win_amd64.pyd +0 -0
- aspose/pyreflection.cp35-win_amd64.pyd +0 -0
- aspose/pyreflection.cp36-win_amd64.pyd +0 -0
- aspose/pyreflection.cp37-win_amd64.pyd +0 -0
- aspose/pyreflection.cp38-win_amd64.pyd +0 -0
- aspose/pyreflection.cp39-win_amd64.pyd +0 -0
- {aspose_html_net-24.7.0.dist-info → aspose_html_net-24.8.0.dist-info}/METADATA +2 -2
- {aspose_html_net-24.7.0.dist-info → aspose_html_net-24.8.0.dist-info}/RECORD +57 -55
- {aspose_html_net-24.7.0.dist-info → aspose_html_net-24.8.0.dist-info}/WHEEL +0 -0
- {aspose_html_net-24.7.0.dist-info → aspose_html_net-24.8.0.dist-info}/entry_points.txt +0 -0
- {aspose_html_net-24.7.0.dist-info → aspose_html_net-24.8.0.dist-info}/top_level.txt +0 -0
aspose/__init__.py
CHANGED
@@ -1,139 +1,82 @@
|
|
1
|
-
import sys
|
2
|
-
import sysconfig
|
3
1
|
import os
|
4
|
-
import
|
5
|
-
from importlib._bootstrap import _load
|
6
|
-
from importlib import util
|
7
|
-
from importlib.machinery import SourceFileLoader
|
8
|
-
import inspect
|
2
|
+
import sys
|
9
3
|
import re
|
4
|
+
import glob
|
5
|
+
import platform
|
6
|
+
from importlib import import_module
|
7
|
+
import importlib.abc as impabc
|
8
|
+
import importlib.machinery as impmach
|
9
|
+
from types import ModuleType
|
10
10
|
|
11
|
-
|
12
|
-
extension_suffixes = im.EXTENSION_SUFFIXES[:-1]
|
13
|
-
_platform_suffixes = [None] * (2 * len(extension_suffixes))
|
14
|
-
_platform_suffixes[0::2] = extension_suffixes
|
15
|
-
_platform_suffixes[1::2] = [re.sub(r"\.so", ".dylib", str) for str in extension_suffixes]
|
16
|
-
else:
|
17
|
-
_platform_suffixes = im.EXTENSION_SUFFIXES[:-1]
|
18
|
-
|
19
|
-
def foreach_file(folder, suffixes, action):
|
20
|
-
for file in os.listdir(folder):
|
21
|
-
full_path = os.path.join(folder, file)
|
22
|
-
if os.path.isfile(full_path):
|
23
|
-
for ext in suffixes:
|
24
|
-
if file.endswith(ext):
|
25
|
-
file_name = file.split('.', 1)[0]
|
26
|
-
if file_name.endswith("_d") == ext.startswith("_d"):
|
27
|
-
name = file[:-len(ext)]
|
28
|
-
action(name, full_path)
|
29
|
-
|
30
|
-
|
31
|
-
class AsposeModuleLoader:
|
32
|
-
aspose_native_lib_dir = os.path.dirname(__file__)
|
33
|
-
aspose_py_modules = os.path.join(aspose_native_lib_dir, "lib")
|
34
|
-
|
35
|
-
def load_module(self, fullname):
|
36
|
-
try:
|
37
|
-
return sys.modules[fullname]
|
38
|
-
except KeyError:
|
39
|
-
pass
|
40
|
-
|
41
|
-
parts = fullname.split('.')
|
42
|
-
parts_len = len(parts)
|
43
|
-
if parts_len < 2:
|
44
|
-
return None
|
45
|
-
|
46
|
-
native_name = parts[1]
|
47
|
-
package_name = ".".join(parts[:-1])
|
48
|
-
|
49
|
-
if parts_len == 2:
|
50
|
-
# root Aspose native library
|
51
|
-
native_module = self._load_native_module(native_name)
|
52
|
-
if native_module == None:
|
53
|
-
return None
|
54
|
-
|
55
|
-
self._register_additional_classes(native_module, native_name)
|
56
|
-
|
57
|
-
return self._prepare_as_package(native_module, fullname, package_name)
|
58
|
-
|
59
|
-
else:
|
60
|
-
# submodule
|
61
|
-
parent_mod = self.load_module(package_name)
|
62
|
-
mod = getattr(parent_mod, parts[-1])
|
63
|
-
if mod == None:
|
64
|
-
return None
|
65
|
-
|
66
|
-
self._register_additional_classes(mod, os.path.join(*parts[1:]))
|
67
|
-
|
68
|
-
return self._prepare_as_package(mod, fullname, package_name)
|
69
|
-
|
70
|
-
def _prepare_as_package(self, module, fullname, package):
|
71
|
-
module.__package__ = package
|
72
|
-
module.__path__ = []
|
73
|
-
sys.modules.setdefault(fullname, module)
|
74
|
-
return module
|
75
|
-
|
76
|
-
def _load_native_module(self, native_name):
|
77
|
-
for ext in _platform_suffixes:
|
78
|
-
lib_file = os.path.join(
|
79
|
-
self.aspose_native_lib_dir, native_name + ext)
|
80
|
-
if os.path.isfile(lib_file):
|
81
|
-
loader = im.ExtensionFileLoader(native_name, lib_file)
|
82
|
-
spec = im.ModuleSpec(native_name, loader, origin=lib_file)
|
83
|
-
return _load(spec)
|
84
|
-
|
85
|
-
return None
|
86
|
-
|
87
|
-
@staticmethod
|
88
|
-
def _import_file(module, name, path):
|
89
|
-
try:
|
90
|
-
private_name = module.__name__ + "._" + name
|
91
|
-
src_module = SourceFileLoader(private_name, path).load_module()
|
92
|
-
for element_name in dir(src_module):
|
93
|
-
element = getattr(src_module, element_name)
|
94
|
-
if hasattr(element, "__module__") and element.__module__ == private_name:
|
95
|
-
element.__module__ = module.__name__
|
96
|
-
element.__name__ = module.__name__ + "." + name
|
97
|
-
setattr(module, element_name, element)
|
98
|
-
|
99
|
-
except Exception as e:
|
100
|
-
print(e)
|
101
|
-
|
102
|
-
def _register_additional_classes(self, module, sub_lib):
|
103
|
-
folder = os.path.join(AsposeModuleLoader.aspose_py_modules, sub_lib)
|
104
|
-
if os.path.isdir(folder):
|
105
|
-
foreach_file(folder, im.SOURCE_SUFFIXES, lambda name, path,
|
106
|
-
module=module: AsposeModuleLoader._import_file(module, name, path))
|
107
|
-
|
108
|
-
return
|
109
|
-
|
110
|
-
|
111
|
-
class AsposeModuleFinder:
|
112
|
-
def find_module(self, fullname, path=None):
|
113
|
-
if fullname.startswith(__package__):
|
114
|
-
return AsposeModuleLoader()
|
115
|
-
return None
|
11
|
+
_pkg_dir = os.path.dirname(__file__)
|
116
12
|
|
13
|
+
os.environ['NETCORE_WRAPPER_NETCORE_DIR_aspose'] = os.path.join(_pkg_dir, 'netcore')
|
14
|
+
|
15
|
+
os.environ['NETCORE_WRAPPER_ASSEMBLY_DIR_aspose'] = os.path.join(_pkg_dir, 'assemblies')
|
16
|
+
|
17
|
+
os.environ['WRAPPER_MODULE_DIR_aspose'] = _pkg_dir
|
117
18
|
|
118
19
|
__path__ = []
|
119
20
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
21
|
+
def get_vspec_ext_suffixes():
|
22
|
+
ver_maj_min = ''.join(str(x) for x in sys.version_info[:2])
|
23
|
+
return [sfx for sfx in impmach.EXTENSION_SUFFIXES if ver_maj_min in sfx]
|
24
|
+
|
25
|
+
_vspec_ext_suffixes = get_vspec_ext_suffixes()
|
26
|
+
|
27
|
+
def get_all():
|
28
|
+
is_win_not_debug = (platform.system() == 'Windows') and (next((sfx for sfx in _vspec_ext_suffixes if sfx.startswith('_d')), None) is None)
|
29
|
+
all_dict = dict()
|
30
|
+
for entry in glob.glob(os.path.join(_pkg_dir, '*')):
|
31
|
+
if os.path.isfile(entry):
|
32
|
+
_,filename = os.path.split(entry)
|
33
|
+
mod_name = next((filename[:-len(sfx)] for sfx in _vspec_ext_suffixes if filename.endswith(sfx)), None)
|
34
|
+
if not ((mod_name is None) or ('.' in mod_name) or (is_win_not_debug and mod_name.endswith('_d'))):
|
35
|
+
all_dict[mod_name] = mod_name
|
36
|
+
return list(all_dict.keys())
|
37
|
+
|
38
|
+
__all__ = get_all()
|
39
|
+
|
40
|
+
if sys.version_info < (3, 6, 0):
|
41
|
+
def imp_error_t(cls):
|
42
|
+
cls._imp_error_t = ImportError
|
43
|
+
return cls
|
44
|
+
else:
|
45
|
+
def imp_error_t(cls):
|
46
|
+
cls._imp_error_t = ModuleNotFoundError
|
47
|
+
return cls
|
48
|
+
|
49
|
+
@imp_error_t
|
50
|
+
class AsposeSubModuleLoader(impabc.Loader):
|
51
|
+
def create_module(self, spec):
|
52
|
+
package_name,_,module_name = spec.name.rpartition('.')
|
53
|
+
package_obj = import_module(package_name)
|
54
|
+
module_obj = getattr(package_obj, module_name, None)
|
55
|
+
if module_obj is None:
|
56
|
+
err = self._imp_error_t('No module named \''+spec.name+'\'; module \''+package_name+'\' has no submodule \''+module_name+'\'')
|
57
|
+
raise err
|
58
|
+
if not isinstance(module_obj, ModuleType):
|
59
|
+
err = self._imp_error_t('No module named \''+spec.name+'\'; \''+spec.name+'\' is not a module')
|
60
|
+
raise err
|
61
|
+
return module_obj
|
62
|
+
def exec_module(self, module):
|
63
|
+
pass
|
64
|
+
|
65
|
+
class AsposeMetaPathFinder(impabc.MetaPathFinder):
|
66
|
+
_chk_re = re.compile(__package__+r'\.([^.]+)(\.)?')
|
67
|
+
_submod_loader = AsposeSubModuleLoader()
|
68
|
+
|
69
|
+
def find_spec(self, fullname, path, target=None):
|
70
|
+
m = self._chk_re.match(fullname)
|
71
|
+
if not (m is None):
|
72
|
+
if m.group(2) is None:
|
73
|
+
module_name = m.group(1)
|
74
|
+
for sfx in _vspec_ext_suffixes:
|
75
|
+
filename=os.path.join(_pkg_dir, module_name+sfx)
|
76
|
+
if os.path.isfile(filename):
|
77
|
+
return impmach.ModuleSpec(fullname, impmach.ExtensionFileLoader(fullname, filename), origin=filename, is_package=True)
|
78
|
+
else:
|
79
|
+
return impmach.ModuleSpec(fullname, self._submod_loader, is_package=True)
|
80
|
+
pass
|
81
|
+
|
82
|
+
sys.meta_path.append(AsposeMetaPathFinder())
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
"""Nuitka Yaml folder"""
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# yamllint disable rule:line-length
|
2
|
+
# yamllint disable rule:indentation
|
3
|
+
# yamllint disable rule:comments-indentation
|
4
|
+
# too many spelling things, spell-checker: disable
|
5
|
+
---
|
6
|
+
- module-name: 'aspose.html'
|
7
|
+
implicit-imports:
|
8
|
+
- depends:
|
9
|
+
- 'aspose'
|
10
|
+
- 'aspose.pydrawing'
|
11
|
+
- 'aspose.pyreflection'
|
12
|
+
- 'aspose.pygc'
|
13
|
+
- 'aspose.pycore'
|
14
|
+
|
15
|
+
- module-name: 'aspose'
|
16
|
+
data-files:
|
17
|
+
dirs:
|
18
|
+
- 'netcore'
|
19
|
+
- 'assemblies'
|