winrt-Microsoft.Web.WebView2.Dll 4!1.0.4191.47__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.
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/.gitignore +31 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/LICENSE +22 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/LICENSE.Microsoft.Web.WebView2.txt +27 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/NOTICE.Microsoft.Web.WebView2.txt +85 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/PKG-INFO +35 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/README.md +12 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/hatch_build.py +181 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/pyproject.toml +50 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/winrt/microsoft/web/webview2/dll/__init__.py +54 -0
- winrt_microsoft_web_webview2_dll-4!1.0.4191.47/winrt/microsoft/web/webview2/dll/py.typed +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Every top-level directory starting with "_" is build output: _build holds the
|
|
2
|
+
# CMake build trees, _install the install prefixes, _tools the downloaded
|
|
3
|
+
# packages, _typing the packages merged for the type checkers and _site the
|
|
4
|
+
# documentation.
|
|
5
|
+
/_*/
|
|
6
|
+
|
|
7
|
+
# A projection table is carried as text and compiled when the projection is
|
|
8
|
+
# built, so the binary is build output wherever it turns up.
|
|
9
|
+
_table.pywinrt
|
|
10
|
+
|
|
11
|
+
# The .dlls a package redistributes are taken out of a NuGet package as it is
|
|
12
|
+
# built, so they are build output rather than something this repository keeps.
|
|
13
|
+
/redist/*/nuget/
|
|
14
|
+
|
|
15
|
+
# Python
|
|
16
|
+
__pycache__/
|
|
17
|
+
*.pyc
|
|
18
|
+
*.egg-info/
|
|
19
|
+
.venv/
|
|
20
|
+
/wheelhouse/
|
|
21
|
+
build/
|
|
22
|
+
|
|
23
|
+
# .NET, which builds PyWinRT
|
|
24
|
+
bin/
|
|
25
|
+
obj/
|
|
26
|
+
*.binlog
|
|
27
|
+
|
|
28
|
+
# Editors
|
|
29
|
+
.vs/
|
|
30
|
+
.vscode/
|
|
31
|
+
*.user
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
Copyright (c) 2021-2026 David Lechner <david@pybricks.com>
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright (C) Microsoft Corporation. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
* Redistributions in binary form must reproduce the above
|
|
10
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
11
|
+
in the documentation and/or other materials provided with the
|
|
12
|
+
distribution.
|
|
13
|
+
* The name of Microsoft Corporation, or the names of its contributors
|
|
14
|
+
may not be used to endorse or promote products derived from this
|
|
15
|
+
software without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
18
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
19
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
20
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
21
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
22
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
23
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
24
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
25
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
NOTICES AND INFORMATION
|
|
2
|
+
Do Not Translate or Localize
|
|
3
|
+
|
|
4
|
+
This software incorporates material from third parties. Microsoft makes certain
|
|
5
|
+
open source code available at https://3rdpartysource.microsoft.com, or you may
|
|
6
|
+
send a check or money order for US $5.00, including the product name, the open
|
|
7
|
+
source component name, and version number, to:
|
|
8
|
+
|
|
9
|
+
Source Code Compliance Team
|
|
10
|
+
Microsoft Corporation
|
|
11
|
+
One Microsoft Way
|
|
12
|
+
Redmond, WA 98052
|
|
13
|
+
USA
|
|
14
|
+
|
|
15
|
+
Notwithstanding any other terms, you may reverse engineer this software to the
|
|
16
|
+
extent required to debug changes to any libraries licensed under the GNU Lesser
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
----------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
Antlr3.Runtime 3.5.2-rc1 - BSD 3-Clause
|
|
22
|
+
|
|
23
|
+
[The "BSD license"]
|
|
24
|
+
Copyright (c) 2011 The ANTLR Project
|
|
25
|
+
All rights reserved.
|
|
26
|
+
|
|
27
|
+
Redistribution and use in source and binary forms, with or without
|
|
28
|
+
modification, are permitted provided that the following conditions
|
|
29
|
+
are met:
|
|
30
|
+
|
|
31
|
+
1. Redistributions of source code must retain the above copyright
|
|
32
|
+
notice, this list of conditions and the following disclaimer.
|
|
33
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
34
|
+
notice, this list of conditions and the following disclaimer in the
|
|
35
|
+
documentation and/or other materials provided with the distribution.
|
|
36
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
37
|
+
contributors may be used to endorse or promote products derived from
|
|
38
|
+
this software without specific prior written permission.
|
|
39
|
+
|
|
40
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
41
|
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
42
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
43
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
44
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
45
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
46
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
47
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
48
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
49
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
50
|
+
|
|
51
|
+
---------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
---------------------------------------------------------
|
|
54
|
+
|
|
55
|
+
StringTemplate4 4.0.9-rc1 - BSD 3-Clause
|
|
56
|
+
|
|
57
|
+
[The "BSD license"]
|
|
58
|
+
Copyright (c) 2011 The ANTLR Project
|
|
59
|
+
All rights reserved.
|
|
60
|
+
|
|
61
|
+
Redistribution and use in source and binary forms, with or without
|
|
62
|
+
modification, are permitted provided that the following conditions
|
|
63
|
+
are met:
|
|
64
|
+
|
|
65
|
+
1. Redistributions of source code must retain the above copyright
|
|
66
|
+
notice, this list of conditions and the following disclaimer.
|
|
67
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
68
|
+
notice, this list of conditions and the following disclaimer in the
|
|
69
|
+
documentation and/or other materials provided with the distribution.
|
|
70
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
71
|
+
contributors may be used to endorse or promote products derived from
|
|
72
|
+
this software without specific prior written permission.
|
|
73
|
+
|
|
74
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
75
|
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
76
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
77
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
78
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
79
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
80
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
81
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
82
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
83
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
84
|
+
|
|
85
|
+
---------------------------------------------------------
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: winrt-Microsoft.Web.WebView2.Dll
|
|
3
|
+
Version: 4!1.0.4191.47
|
|
4
|
+
Summary: Microsoft.Web.WebView2.Core.dll, redistributed for PyWinRT
|
|
5
|
+
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
6
|
+
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/projection/webview2/CHANGELOG.md
|
|
8
|
+
License-Expression: MIT AND LicenseRef-Microsoft-Web-WebView2
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: LICENSE.Microsoft.Web.WebView2.txt
|
|
11
|
+
License-File: NOTICE.Microsoft.Web.WebView2.txt
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
25
|
+
|
|
26
|
+
# winrt-Microsoft.Web.WebView2.Dll
|
|
27
|
+
|
|
28
|
+
Redistributes `Microsoft.Web.WebView2.Core.dll`
|
|
29
|
+
from version 1.0.4191.47 of the `Microsoft.Web.WebView2` NuGet package, one wheel
|
|
30
|
+
per architecture.
|
|
31
|
+
|
|
32
|
+
`winrt-Microsoft.Web.WebView2`
|
|
33
|
+
depends on this package and imports it, which puts the `.dll` on the DLL
|
|
34
|
+
search path. Its `load()` loads the `.dll` into the process, for code that
|
|
35
|
+
looks for it by name without searching that path.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Microsoft.Web.WebView2.Dll
|
|
4
|
+
|
|
5
|
+
Redistributes `Microsoft.Web.WebView2.Core.dll`
|
|
6
|
+
from version 1.0.4191.47 of the `Microsoft.Web.WebView2` NuGet package, one wheel
|
|
7
|
+
per architecture.
|
|
8
|
+
|
|
9
|
+
`winrt-Microsoft.Web.WebView2`
|
|
10
|
+
depends on this package and imports it, which puts the `.dll` on the DLL
|
|
11
|
+
search path. Its `load()` loads the `.dll` into the process, for code that
|
|
12
|
+
looks for it by name without searching that path.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
import hashlib
|
|
4
|
+
import io
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import shutil
|
|
8
|
+
import sysconfig
|
|
9
|
+
import urllib.request
|
|
10
|
+
import zipfile
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
from hatchling.builders.config import BuilderConfig
|
|
15
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
16
|
+
|
|
17
|
+
NUGET_PACKAGE = "Microsoft.Web.WebView2"
|
|
18
|
+
NUGET_VERSION = "1.0.4191.47"
|
|
19
|
+
|
|
20
|
+
# Where the .nupkg comes from and what it has to hash to. The build fetches it
|
|
21
|
+
# rather than the source distribution carrying the .dll, so that nothing
|
|
22
|
+
# calling itself source holds a prebuilt binary; the checksum, taken when this
|
|
23
|
+
# file was generated, is what makes the download worth trusting.
|
|
24
|
+
NUGET_URL = "https://api.nuget.org/v3-flatcontainer/microsoft.web.webview2/1.0.4191.47/microsoft.web.webview2.1.0.4191.47.nupkg"
|
|
25
|
+
NUGET_SHA256 = "f492bbf547d0da329553b6727435b677579b1e9f91cc9e4a1ad029366d5f23d0"
|
|
26
|
+
|
|
27
|
+
# An unpacked copy of the NuGet package. scripts/build-bdist.py and
|
|
28
|
+
# scripts/build-sdist.py point this at what scripts/fetch-tools.ps1
|
|
29
|
+
# downloaded, and it is the escape hatch for a machine that cannot reach
|
|
30
|
+
# nuget.org: nothing is downloaded when it is set.
|
|
31
|
+
NUGET_PATH_ENV = "WEBVIEW2_PATH"
|
|
32
|
+
|
|
33
|
+
# Where what the build took out of the NuGet package is kept, so that a second
|
|
34
|
+
# build needs neither the network nor the unpacked copy again.
|
|
35
|
+
PAYLOAD_DIR = "nuget"
|
|
36
|
+
|
|
37
|
+
DLL_NAME = "Microsoft.Web.WebView2.Core.dll"
|
|
38
|
+
LICENSE_ID = "LicenseRef-Microsoft-Web-WebView2"
|
|
39
|
+
MODULE_PATH = "winrt/microsoft/web/webview2/dll"
|
|
40
|
+
SBOM_NAME = "cyclonedx.json"
|
|
41
|
+
|
|
42
|
+
# Where in the NuGet package the .dll of each architecture is, keyed by the
|
|
43
|
+
# platform tag of the wheel that carries it.
|
|
44
|
+
DLL_PATHS = {
|
|
45
|
+
"win32": "runtimes/win-x86/native_uap/Microsoft.Web.WebView2.Core.dll",
|
|
46
|
+
"win_amd64": "runtimes/win-x64/native_uap/Microsoft.Web.WebView2.Core.dll",
|
|
47
|
+
"win_arm64": "runtimes/win-arm64/native_uap/Microsoft.Web.WebView2.Core.dll",
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Which architecture to build for. There is one wheel per architecture, so
|
|
51
|
+
# scripts/build-bdist.py says which; a user building the source distribution
|
|
52
|
+
# builds for the machine they are on.
|
|
53
|
+
PLAT_NAME_ENV = "PYWINRT_PLAT_NAME"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def get_plat_name() -> str:
|
|
57
|
+
"""
|
|
58
|
+
The platform tag of the wheel being built.
|
|
59
|
+
"""
|
|
60
|
+
plat_name = os.environ.get(PLAT_NAME_ENV) or sysconfig.get_platform()
|
|
61
|
+
plat_name = plat_name.replace("-", "_").replace(".", "_")
|
|
62
|
+
|
|
63
|
+
if plat_name not in DLL_PATHS:
|
|
64
|
+
raise RuntimeError(f"{NUGET_PACKAGE} ships no .dll for {plat_name}")
|
|
65
|
+
|
|
66
|
+
return plat_name
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def download_nuget_package() -> bytes:
|
|
70
|
+
"""
|
|
71
|
+
The .nupkg, checked against the hash this file was generated with.
|
|
72
|
+
"""
|
|
73
|
+
try:
|
|
74
|
+
with urllib.request.urlopen(NUGET_URL, timeout=120) as response:
|
|
75
|
+
data = response.read()
|
|
76
|
+
except OSError as error:
|
|
77
|
+
raise RuntimeError(
|
|
78
|
+
f"could not download {NUGET_URL}: {error}."
|
|
79
|
+
f" Set {NUGET_PATH_ENV} to an unpacked copy of {NUGET_PACKAGE}"
|
|
80
|
+
f" {NUGET_VERSION} to build without reaching the network."
|
|
81
|
+
) from error
|
|
82
|
+
|
|
83
|
+
digest = hashlib.sha256(data).hexdigest()
|
|
84
|
+
|
|
85
|
+
if digest != NUGET_SHA256:
|
|
86
|
+
raise RuntimeError(f"{NUGET_URL} hashes to {digest} and not to {NUGET_SHA256}")
|
|
87
|
+
|
|
88
|
+
return data
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def get_sbom() -> dict[str, Any]:
|
|
92
|
+
"""
|
|
93
|
+
The bill of materials that PEP 770 puts in the wheel.
|
|
94
|
+
|
|
95
|
+
Two parties are named and kept apart. The distribution is PyWinRT's, and
|
|
96
|
+
PyWinRT is an independent project rather than a Microsoft one, so it is
|
|
97
|
+
the root component and Microsoft is not its supplier. The .dll inside it
|
|
98
|
+
is Microsoft's, under Microsoft's own license, and is a component of that
|
|
99
|
+
root rather than the root itself.
|
|
100
|
+
"""
|
|
101
|
+
return {
|
|
102
|
+
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
|
|
103
|
+
"bomFormat": "CycloneDX",
|
|
104
|
+
"specVersion": "1.6",
|
|
105
|
+
"metadata": {
|
|
106
|
+
"component": {
|
|
107
|
+
"type": "library",
|
|
108
|
+
"name": "winrt-Microsoft.Web.WebView2.Dll",
|
|
109
|
+
"version": "4!1.0.4191.47",
|
|
110
|
+
"purl": "pkg:pypi/winrt-microsoft-web-webview2-dll@4!1.0.4191.47",
|
|
111
|
+
"licenses": [{"expression": "MIT"}],
|
|
112
|
+
"supplier": {"name": "PyWinRT"},
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"components": [
|
|
116
|
+
{
|
|
117
|
+
"type": "library",
|
|
118
|
+
"name": DLL_NAME,
|
|
119
|
+
"version": NUGET_VERSION,
|
|
120
|
+
"purl": f"pkg:nuget/{NUGET_PACKAGE}@{NUGET_VERSION}",
|
|
121
|
+
"licenses": [{"license": {"name": LICENSE_ID}}],
|
|
122
|
+
"supplier": {"name": "Microsoft Corporation"},
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class DllBuildHook(BuildHookInterface[BuilderConfig]):
|
|
129
|
+
"""
|
|
130
|
+
Puts the redistributed .dll into the wheel being built.
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
PLUGIN_NAME = "custom"
|
|
134
|
+
|
|
135
|
+
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
|
|
136
|
+
if self.target_name != "wheel":
|
|
137
|
+
return
|
|
138
|
+
|
|
139
|
+
plat_name = get_plat_name()
|
|
140
|
+
payload_path = Path(self.root) / PAYLOAD_DIR
|
|
141
|
+
|
|
142
|
+
# A .dll is data rather than an extension module, so one wheel serves
|
|
143
|
+
# every version of Python and only the architecture narrows it.
|
|
144
|
+
build_data["tag"] = f"py3-none-{plat_name}"
|
|
145
|
+
build_data["pure_python"] = False
|
|
146
|
+
build_data["force_include"][
|
|
147
|
+
os.fspath(self.stage_dll(payload_path, DLL_PATHS[plat_name]))
|
|
148
|
+
] = f"{MODULE_PATH}/{DLL_NAME}"
|
|
149
|
+
|
|
150
|
+
sbom_path = payload_path / SBOM_NAME
|
|
151
|
+
sbom_path.write_text(
|
|
152
|
+
json.dumps(get_sbom(), indent=2) + "\n",
|
|
153
|
+
encoding="utf-8",
|
|
154
|
+
newline="\n",
|
|
155
|
+
)
|
|
156
|
+
build_data["sbom_files"].append(f"{PAYLOAD_DIR}/{SBOM_NAME}")
|
|
157
|
+
|
|
158
|
+
def stage_dll(self, payload_path: Path, relative: str) -> Path:
|
|
159
|
+
"""
|
|
160
|
+
Takes one architecture's .dll out of the NuGet package.
|
|
161
|
+
"""
|
|
162
|
+
destination = payload_path / relative
|
|
163
|
+
|
|
164
|
+
if destination.is_file():
|
|
165
|
+
return destination
|
|
166
|
+
|
|
167
|
+
destination.parent.mkdir(parents=True, exist_ok=True)
|
|
168
|
+
|
|
169
|
+
nuget_path = os.environ.get(NUGET_PATH_ENV)
|
|
170
|
+
|
|
171
|
+
if nuget_path is not None:
|
|
172
|
+
shutil.copyfile(Path(nuget_path) / relative, destination)
|
|
173
|
+
|
|
174
|
+
return destination
|
|
175
|
+
|
|
176
|
+
# A .nupkg is a zip, and the one nuget.org serves is byte for byte the
|
|
177
|
+
# one that unpacking it leaves behind, so the same hash covers both.
|
|
178
|
+
with zipfile.ZipFile(io.BytesIO(download_nuget_package())) as package:
|
|
179
|
+
destination.write_bytes(package.read(relative))
|
|
180
|
+
|
|
181
|
+
return destination
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["hatchling"]
|
|
5
|
+
build-backend = "hatchling.build"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Microsoft.Web.WebView2.Dll"
|
|
9
|
+
version = "4!1.0.4191.47"
|
|
10
|
+
description = "Microsoft.Web.WebView2.Core.dll, redistributed for PyWinRT"
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
# The Python in this package is PyWinRT's and the .dll in it is Microsoft's,
|
|
13
|
+
# so the expression names both and the text of each one is carried.
|
|
14
|
+
license = "MIT AND LicenseRef-Microsoft-Web-WebView2"
|
|
15
|
+
license-files = [
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"LICENSE.Microsoft.Web.WebView2.txt",
|
|
18
|
+
"NOTICE.Microsoft.Web.WebView2.txt",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Operating System :: Microsoft :: Windows",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
27
|
+
"Programming Language :: Python :: 3.15",
|
|
28
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
29
|
+
"Intended Audience :: Developers",
|
|
30
|
+
]
|
|
31
|
+
requires-python = ">=3.11"
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Documentation = "https://pywinrt.readthedocs.io"
|
|
35
|
+
Repository = "https://github.com/pywinrt/pywinrt"
|
|
36
|
+
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/projection/webview2/CHANGELOG.md"
|
|
37
|
+
|
|
38
|
+
# Nothing prebuilt goes in the source distribution: the .dll the wheel
|
|
39
|
+
# redistributes is fetched by the build, and the bill of materials is written
|
|
40
|
+
# by it.
|
|
41
|
+
[tool.hatch.build.targets.sdist]
|
|
42
|
+
only-include = ["winrt", "hatch_build.py", "LICENSE", "README.md"]
|
|
43
|
+
|
|
44
|
+
[tool.hatch.build.targets.wheel]
|
|
45
|
+
packages = ["winrt"]
|
|
46
|
+
|
|
47
|
+
# hatch_build.py, which takes the .dll out of the NuGet package, puts the one
|
|
48
|
+
# this wheel is for beside the module that registers it, tags the wheel for
|
|
49
|
+
# that architecture and writes the bill of materials.
|
|
50
|
+
[tool.hatch.build.hooks.custom]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Microsoft.Web.WebView2.Core.dll, redistributed for PyWinRT.
|
|
5
|
+
|
|
6
|
+
Importing this module puts the directory the .dll is in on the DLL search
|
|
7
|
+
path, which is how the Windows Runtime finds it when one of the types it
|
|
8
|
+
implements is activated. The projection package that needs it depends on this
|
|
9
|
+
one and imports it, so there is rarely a reason to import it directly other
|
|
10
|
+
than to call load().
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import os
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
DLL_NAME = "Microsoft.Web.WebView2.Core.dll"
|
|
17
|
+
|
|
18
|
+
# os.add_dll_directory hands back a handle that takes the directory off the
|
|
19
|
+
# search path again when it is closed, so it is held for as long as the module
|
|
20
|
+
# is loaded.
|
|
21
|
+
_dll_search_path_cookie_ = os.add_dll_directory(
|
|
22
|
+
os.fspath(Path(__file__).parent.resolve())
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# The handle load() holds, so that the .dll stays loaded.
|
|
27
|
+
_dll_ = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def get_dll_path() -> str:
|
|
31
|
+
"""
|
|
32
|
+
The full path of the .dll this package redistributes.
|
|
33
|
+
"""
|
|
34
|
+
return os.fspath(Path(__file__).parent / DLL_NAME)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def load() -> None:
|
|
38
|
+
"""
|
|
39
|
+
Load the .dll into the process and keep it loaded.
|
|
40
|
+
|
|
41
|
+
Being on the DLL search path is enough for the Windows Runtime, but not for
|
|
42
|
+
code that loads the .dll by name with LoadLibraryW, which does not search
|
|
43
|
+
the directories added to the path; that finds the .dll only once it is
|
|
44
|
+
loaded. The WinUI WebView2 control from Windows App SDK 2.x does that when
|
|
45
|
+
it creates its default environment
|
|
46
|
+
(https://github.com/microsoft/microsoft-ui-xaml/issues/12158). A packaged
|
|
47
|
+
application that carries the .dll itself does not need this.
|
|
48
|
+
"""
|
|
49
|
+
global _dll_
|
|
50
|
+
|
|
51
|
+
if _dll_ is None:
|
|
52
|
+
import ctypes
|
|
53
|
+
|
|
54
|
+
_dll_ = ctypes.WinDLL(get_dll_path())
|
|
File without changes
|