winrt-Windows.System.Power.Diagnostics 3.2.1__tar.gz → 4!10.0.28000.2705__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_windows_system_power_diagnostics-4!10.0.28000.2705/.gitignore +5 -0
- winrt_windows_system_power_diagnostics-4!10.0.28000.2705/LICENSE +22 -0
- winrt_windows_system_power_diagnostics-4!10.0.28000.2705/PKG-INFO +41 -0
- winrt_windows_system_power_diagnostics-4!10.0.28000.2705/README.md +17 -0
- winrt_windows_system_power_diagnostics-4!10.0.28000.2705/pyproject.toml +50 -0
- {winrt_windows_system_power_diagnostics-3.2.1 → winrt_windows_system_power_diagnostics-4!10.0.28000.2705}/winrt/windows/system/power/diagnostics/__init__.py +4 -5
- winrt_windows_system_power_diagnostics-3.2.1/winrt/_winrt_windows_system_power_diagnostics.pyi → winrt_windows_system_power_diagnostics-4!10.0.28000.2705/winrt/windows/system/power/diagnostics/__init__.pyi +20 -15
- winrt_windows_system_power_diagnostics-4!10.0.28000.2705/winrt/windows/system/power/diagnostics/_table.pywinrt.txt +33 -0
- winrt_windows_system_power_diagnostics-3.2.1/PKG-INFO +0 -23
- winrt_windows_system_power_diagnostics-3.2.1/README.md +0 -7
- winrt_windows_system_power_diagnostics-3.2.1/py.Windows.System.Power.Diagnostics.cpp +0 -422
- winrt_windows_system_power_diagnostics-3.2.1/pyproject.toml +0 -46
- winrt_windows_system_power_diagnostics-3.2.1/pywinrt-version.txt +0 -1
- winrt_windows_system_power_diagnostics-3.2.1/requirements.txt +0 -3
- winrt_windows_system_power_diagnostics-3.2.1/setup.cfg +0 -4
- winrt_windows_system_power_diagnostics-3.2.1/setup.py +0 -33
- winrt_windows_system_power_diagnostics-3.2.1/winrt_Windows.System.Power.Diagnostics.egg-info/PKG-INFO +0 -23
- winrt_windows_system_power_diagnostics-3.2.1/winrt_Windows.System.Power.Diagnostics.egg-info/SOURCES.txt +0 -14
- winrt_windows_system_power_diagnostics-3.2.1/winrt_Windows.System.Power.Diagnostics.egg-info/dependency_links.txt +0 -1
- winrt_windows_system_power_diagnostics-3.2.1/winrt_Windows.System.Power.Diagnostics.egg-info/requires.txt +0 -1
- winrt_windows_system_power_diagnostics-3.2.1/winrt_Windows.System.Power.Diagnostics.egg-info/top_level.txt +0 -1
- {winrt_windows_system_power_diagnostics-3.2.1 → winrt_windows_system_power_diagnostics-4!10.0.28000.2705}/winrt/windows/system/power/diagnostics/py.typed +0 -0
|
@@ -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,41 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: winrt-Windows.System.Power.Diagnostics
|
|
3
|
+
Version: 4!10.0.28000.2705
|
|
4
|
+
Summary: PyWinRT projection of the Windows.System.Power.Diagnostics namespace
|
|
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/winrt/CHANGELOG.md
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
|
+
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
|
19
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: winrt-runtime<5,>=4.0.0
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
26
|
+
|
|
27
|
+
# winrt-Windows.System.Power.Diagnostics
|
|
28
|
+
|
|
29
|
+
Windows Runtime (WinRT) APIs for the `Windows.System.Power.Diagnostics` namespace.
|
|
30
|
+
|
|
31
|
+
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
32
|
+
|
|
33
|
+
The WinRT APIs in it are those of version 10.0.28000.2705 of the
|
|
34
|
+
`Microsoft.Windows.SDK.CPP` NuGet package.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
pip install winrt-Windows.System.Power.Diagnostics
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Other WinRT namespaces are packages of their own, so install the package of
|
|
41
|
+
each namespace your code imports from.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.System.Power.Diagnostics
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for the `Windows.System.Power.Diagnostics` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
8
|
+
|
|
9
|
+
The WinRT APIs in it are those of version 10.0.28000.2705 of the
|
|
10
|
+
`Microsoft.Windows.SDK.CPP` NuGet package.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
pip install winrt-Windows.System.Power.Diagnostics
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Other WinRT namespaces are packages of their own, so install the package of
|
|
17
|
+
each namespace your code imports from.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["hatchling", "winrt-table-compiler>=4.0.0,<5"]
|
|
5
|
+
build-backend = "hatchling.build"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Windows.System.Power.Diagnostics"
|
|
9
|
+
version = "4!10.0.28000.2705"
|
|
10
|
+
description = "PyWinRT projection of the Windows.System.Power.Diagnostics namespace"
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
license = "MIT"
|
|
13
|
+
license-files = ["LICENSE"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Operating System :: Microsoft :: Windows",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
21
|
+
"Programming Language :: Python :: 3.15",
|
|
22
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
23
|
+
"Intended Audience :: Developers",
|
|
24
|
+
"Programming Language :: Python :: Free Threading :: 2 - Beta",
|
|
25
|
+
"Typing :: Typed",
|
|
26
|
+
]
|
|
27
|
+
requires-python = ">=3.11"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"winrt-runtime>=4.0.0,<5",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Documentation = "https://pywinrt.readthedocs.io"
|
|
34
|
+
Repository = "https://github.com/pywinrt/pywinrt"
|
|
35
|
+
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/projection/winrt/CHANGELOG.md"
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.sdist]
|
|
38
|
+
# The text form of the table is what the source distribution carries, and the
|
|
39
|
+
# compiled form is build output wherever it turns up. Hatchling reads no
|
|
40
|
+
# .gitignore above the package, so it has to be told about the latter.
|
|
41
|
+
only-include = ["winrt", "LICENSE", "README.md"]
|
|
42
|
+
exclude = ["**/_table.pywinrt"]
|
|
43
|
+
|
|
44
|
+
[tool.hatch.build.targets.wheel]
|
|
45
|
+
packages = ["winrt"]
|
|
46
|
+
exclude = ["**/_table.pywinrt.txt"]
|
|
47
|
+
|
|
48
|
+
# winrt.table.build_hooks in winrt-table-compiler, which compiles each table
|
|
49
|
+
# the package carries and puts the result beside the __init__.py that loads it.
|
|
50
|
+
[tool.hatch.build.targets.wheel.hooks.winrt-table-compiler]
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
2
2
|
|
|
3
|
+
import winrt.runtime._internals
|
|
3
4
|
import winrt.system
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ForegroundEnergyDiagnostics,
|
|
7
|
-
)
|
|
5
|
+
|
|
6
|
+
winrt.runtime._internals.load_projection(__spec__)
|
|
8
7
|
|
|
9
8
|
__all__ = [
|
|
10
9
|
"BackgroundEnergyDiagnostics",
|
|
@@ -1,46 +1,51 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
2
2
|
|
|
3
|
-
import datetime
|
|
4
|
-
import sys
|
|
5
|
-
import types
|
|
6
3
|
import typing
|
|
7
|
-
import uuid as _uuid
|
|
8
4
|
from builtins import property as _property
|
|
5
|
+
from typing_extensions import deprecated
|
|
9
6
|
|
|
10
|
-
import winrt._winrt
|
|
11
7
|
import winrt.system
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
__all__ = [
|
|
10
|
+
"BackgroundEnergyDiagnostics",
|
|
11
|
+
"ForegroundEnergyDiagnostics",
|
|
12
|
+
]
|
|
14
13
|
|
|
15
14
|
@typing.final
|
|
16
|
-
class BackgroundEnergyDiagnostics_Static(winrt.
|
|
15
|
+
class BackgroundEnergyDiagnostics_Static(winrt.system.Object_Static):
|
|
17
16
|
# System.UInt64 Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics::ComputeTotalEnergyUsage()
|
|
18
|
-
|
|
17
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
19
18
|
def compute_total_energy_usage(cls) -> winrt.system.UInt64: ...
|
|
20
19
|
# System.Void Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics::ResetTotalEnergyUsage()
|
|
21
|
-
|
|
20
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
22
21
|
def reset_total_energy_usage(cls) -> None: ...
|
|
23
22
|
# System.Double Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics::get_DeviceSpecificConversionFactor()
|
|
24
23
|
@_property
|
|
24
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
25
25
|
def device_specific_conversion_factor(cls) -> winrt.system.Double: ...
|
|
26
26
|
|
|
27
27
|
@typing.final
|
|
28
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
28
29
|
class BackgroundEnergyDiagnostics(winrt.system.Object, metaclass=BackgroundEnergyDiagnostics_Static):
|
|
29
|
-
|
|
30
|
+
def __new__(cls, _: typing.Never, /) -> typing.Self:
|
|
31
|
+
"""A class of static members only, so there is nothing to create."""
|
|
30
32
|
|
|
31
33
|
@typing.final
|
|
32
|
-
class ForegroundEnergyDiagnostics_Static(winrt.
|
|
34
|
+
class ForegroundEnergyDiagnostics_Static(winrt.system.Object_Static):
|
|
33
35
|
# System.UInt64 Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics::ComputeTotalEnergyUsage()
|
|
34
|
-
|
|
36
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
35
37
|
def compute_total_energy_usage(cls) -> winrt.system.UInt64: ...
|
|
36
38
|
# System.Void Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics::ResetTotalEnergyUsage()
|
|
37
|
-
|
|
39
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
38
40
|
def reset_total_energy_usage(cls) -> None: ...
|
|
39
41
|
# System.Double Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics::get_DeviceSpecificConversionFactor()
|
|
40
42
|
@_property
|
|
43
|
+
@deprecated("Background Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
41
44
|
def device_specific_conversion_factor(cls) -> winrt.system.Double: ...
|
|
42
45
|
|
|
43
46
|
@typing.final
|
|
47
|
+
@deprecated("Foreground Energy Diagnostics has been deprecated. For more info, see MSDN.")
|
|
44
48
|
class ForegroundEnergyDiagnostics(winrt.system.Object, metaclass=ForegroundEnergyDiagnostics_Static):
|
|
45
|
-
|
|
49
|
+
def __new__(cls, _: typing.Never, /) -> typing.Self:
|
|
50
|
+
"""A class of static members only, so there is nothing to create."""
|
|
46
51
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
format 4.0
|
|
2
|
+
census 2e30db26-66c8-4551-85b9-a537376d8f99 1
|
|
3
|
+
namespace Windows.System.Power.Diagnostics
|
|
4
|
+
|
|
5
|
+
class Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics static python_type
|
|
6
|
+
py BackgroundEnergyDiagnostics
|
|
7
|
+
factory Windows.System.Power.Diagnostics.IBackgroundEnergyDiagnosticsStatics
|
|
8
|
+
property device_specific_conversion_factor static
|
|
9
|
+
get get_DeviceSpecificConversionFactor slot=6 inputs=0 outputs=1 declaring=Windows.System.Power.Diagnostics.IBackgroundEnergyDiagnosticsStatics shape=4 static deprecated
|
|
10
|
+
out double return
|
|
11
|
+
method compute_total_energy_usage static
|
|
12
|
+
method ComputeTotalEnergyUsage slot=7 inputs=0 outputs=1 declaring=Windows.System.Power.Diagnostics.IBackgroundEnergyDiagnosticsStatics shape=4 static deprecated
|
|
13
|
+
out uint64 return
|
|
14
|
+
method reset_total_energy_usage static
|
|
15
|
+
method ResetTotalEnergyUsage slot=8 inputs=0 outputs=0 declaring=Windows.System.Power.Diagnostics.IBackgroundEnergyDiagnosticsStatics shape=0 static deprecated
|
|
16
|
+
|
|
17
|
+
class Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics static python_type
|
|
18
|
+
py ForegroundEnergyDiagnostics
|
|
19
|
+
factory Windows.System.Power.Diagnostics.IForegroundEnergyDiagnosticsStatics
|
|
20
|
+
property device_specific_conversion_factor static
|
|
21
|
+
get get_DeviceSpecificConversionFactor slot=6 inputs=0 outputs=1 declaring=Windows.System.Power.Diagnostics.IForegroundEnergyDiagnosticsStatics shape=4 static deprecated
|
|
22
|
+
out double return
|
|
23
|
+
method compute_total_energy_usage static
|
|
24
|
+
method ComputeTotalEnergyUsage slot=7 inputs=0 outputs=1 declaring=Windows.System.Power.Diagnostics.IForegroundEnergyDiagnosticsStatics shape=4 static deprecated
|
|
25
|
+
out uint64 return
|
|
26
|
+
method reset_total_energy_usage static
|
|
27
|
+
method ResetTotalEnergyUsage slot=8 inputs=0 outputs=0 declaring=Windows.System.Power.Diagnostics.IForegroundEnergyDiagnosticsStatics shape=0 static deprecated
|
|
28
|
+
|
|
29
|
+
interface Windows.System.Power.Diagnostics.IBackgroundEnergyDiagnosticsStatics
|
|
30
|
+
guid d7663702-d3a6-46e0-8f9b-50b95bb4f9c5
|
|
31
|
+
|
|
32
|
+
interface Windows.System.Power.Diagnostics.IForegroundEnergyDiagnosticsStatics
|
|
33
|
+
guid 23ca0917-cd07-4609-be15-8fe894c5e41e
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: winrt-Windows.System.Power.Diagnostics
|
|
3
|
-
Version: 3.2.1
|
|
4
|
-
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
-
License-Expression: MIT
|
|
6
|
-
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
7
|
-
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
8
|
-
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
9
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime~=3.2.1.0
|
|
16
|
-
|
|
17
|
-
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
18
|
-
|
|
19
|
-
# winrt-Windows.System.Power.Diagnostics
|
|
20
|
-
|
|
21
|
-
Windows Runtime (WinRT) APIs for for the `Windows.System.Power.Diagnostics` namespace.
|
|
22
|
-
|
|
23
|
-
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
-
|
|
3
|
-
# winrt-Windows.System.Power.Diagnostics
|
|
4
|
-
|
|
5
|
-
Windows Runtime (WinRT) APIs for for the `Windows.System.Power.Diagnostics` namespace.
|
|
6
|
-
|
|
7
|
-
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.1
|
|
2
|
-
|
|
3
|
-
#include "py.Windows.System.Power.Diagnostics.h"
|
|
4
|
-
|
|
5
|
-
namespace py::cpp::Windows::System::Power::Diagnostics
|
|
6
|
-
{
|
|
7
|
-
// ----- BackgroundEnergyDiagnostics class --------------------
|
|
8
|
-
|
|
9
|
-
static PyObject* _new_BackgroundEnergyDiagnostics(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
10
|
-
{
|
|
11
|
-
static_assert(py::py_type<winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics>::type_name);
|
|
12
|
-
py::set_invalid_activation_error(py::py_type<winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics>::type_name);
|
|
13
|
-
return nullptr;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
static PyObject* BackgroundEnergyDiagnostics_ComputeTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
17
|
-
{
|
|
18
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
19
|
-
|
|
20
|
-
if (arg_count == 0)
|
|
21
|
-
{
|
|
22
|
-
try
|
|
23
|
-
{
|
|
24
|
-
static std::optional<bool> is_overload_present{};
|
|
25
|
-
|
|
26
|
-
if (!is_overload_present.has_value())
|
|
27
|
-
{
|
|
28
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (!is_overload_present.value())
|
|
32
|
-
{
|
|
33
|
-
py::set_arg_count_version_error(0);
|
|
34
|
-
return nullptr;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return py::convert([&]()
|
|
38
|
-
{
|
|
39
|
-
auto _gil = release_gil();
|
|
40
|
-
return winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::ComputeTotalEnergyUsage();
|
|
41
|
-
}());
|
|
42
|
-
}
|
|
43
|
-
catch (...)
|
|
44
|
-
{
|
|
45
|
-
py::to_PyErr();
|
|
46
|
-
return nullptr;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else
|
|
50
|
-
{
|
|
51
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
52
|
-
return nullptr;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
static PyObject* BackgroundEnergyDiagnostics_ResetTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
57
|
-
{
|
|
58
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
59
|
-
|
|
60
|
-
if (arg_count == 0)
|
|
61
|
-
{
|
|
62
|
-
try
|
|
63
|
-
{
|
|
64
|
-
static std::optional<bool> is_overload_present{};
|
|
65
|
-
|
|
66
|
-
if (!is_overload_present.has_value())
|
|
67
|
-
{
|
|
68
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!is_overload_present.value())
|
|
72
|
-
{
|
|
73
|
-
py::set_arg_count_version_error(0);
|
|
74
|
-
return nullptr;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
{
|
|
78
|
-
auto _gil = release_gil();
|
|
79
|
-
winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::ResetTotalEnergyUsage();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
Py_RETURN_NONE;
|
|
83
|
-
}
|
|
84
|
-
catch (...)
|
|
85
|
-
{
|
|
86
|
-
py::to_PyErr();
|
|
87
|
-
return nullptr;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
else
|
|
91
|
-
{
|
|
92
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
93
|
-
return nullptr;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static PyObject* BackgroundEnergyDiagnostics_get_DeviceSpecificConversionFactor(PyObject* /*unused*/, void* /*unused*/) noexcept
|
|
98
|
-
{
|
|
99
|
-
try
|
|
100
|
-
{
|
|
101
|
-
static std::optional<bool> is_property_present{};
|
|
102
|
-
|
|
103
|
-
if (!is_property_present.has_value())
|
|
104
|
-
{
|
|
105
|
-
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"DeviceSpecificConversionFactor");
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (!is_property_present.value())
|
|
109
|
-
{
|
|
110
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
111
|
-
return nullptr;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return py::convert([&]()
|
|
115
|
-
{
|
|
116
|
-
auto _gil = release_gil();
|
|
117
|
-
return winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::DeviceSpecificConversionFactor();
|
|
118
|
-
}());
|
|
119
|
-
}
|
|
120
|
-
catch (...)
|
|
121
|
-
{
|
|
122
|
-
py::to_PyErr();
|
|
123
|
-
return nullptr;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
static PyMethodDef _methods_BackgroundEnergyDiagnostics[] = {
|
|
128
|
-
{ }};
|
|
129
|
-
|
|
130
|
-
static PyGetSetDef _getset_BackgroundEnergyDiagnostics[] = {
|
|
131
|
-
{ }};
|
|
132
|
-
|
|
133
|
-
static PyType_Slot _type_slots_BackgroundEnergyDiagnostics[] = {
|
|
134
|
-
{ Py_tp_new, reinterpret_cast<void*>(_new_BackgroundEnergyDiagnostics) },
|
|
135
|
-
{ Py_tp_methods, reinterpret_cast<void*>(_methods_BackgroundEnergyDiagnostics) },
|
|
136
|
-
{ Py_tp_getset, reinterpret_cast<void*>(_getset_BackgroundEnergyDiagnostics) },
|
|
137
|
-
{ }};
|
|
138
|
-
|
|
139
|
-
static PyType_Spec type_spec_BackgroundEnergyDiagnostics = {
|
|
140
|
-
"winrt._winrt_windows_system_power_diagnostics.BackgroundEnergyDiagnostics",
|
|
141
|
-
0,
|
|
142
|
-
0,
|
|
143
|
-
Py_TPFLAGS_DEFAULT,
|
|
144
|
-
_type_slots_BackgroundEnergyDiagnostics};
|
|
145
|
-
|
|
146
|
-
static PyGetSetDef getset_BackgroundEnergyDiagnostics_Static[] = {
|
|
147
|
-
{ "device_specific_conversion_factor", reinterpret_cast<getter>(BackgroundEnergyDiagnostics_get_DeviceSpecificConversionFactor), nullptr, nullptr, nullptr },
|
|
148
|
-
{ }};
|
|
149
|
-
|
|
150
|
-
static PyMethodDef methods_BackgroundEnergyDiagnostics_Static[] = {
|
|
151
|
-
{ "compute_total_energy_usage", reinterpret_cast<PyCFunction>(BackgroundEnergyDiagnostics_ComputeTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
152
|
-
{ "reset_total_energy_usage", reinterpret_cast<PyCFunction>(BackgroundEnergyDiagnostics_ResetTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
153
|
-
{ }};
|
|
154
|
-
|
|
155
|
-
static PyType_Slot type_slots_BackgroundEnergyDiagnostics_Static[] =
|
|
156
|
-
{
|
|
157
|
-
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
158
|
-
{ Py_tp_getset, reinterpret_cast<void*>(getset_BackgroundEnergyDiagnostics_Static) },
|
|
159
|
-
{ Py_tp_methods, reinterpret_cast<void*>(methods_BackgroundEnergyDiagnostics_Static) },
|
|
160
|
-
{ }
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
static PyType_Spec type_spec_BackgroundEnergyDiagnostics_Static = {
|
|
164
|
-
"winrt._winrt_windows_system_power_diagnostics.BackgroundEnergyDiagnostics_Static",
|
|
165
|
-
static_cast<int>(PyType_Type.tp_basicsize),
|
|
166
|
-
static_cast<int>(PyType_Type.tp_itemsize),
|
|
167
|
-
Py_TPFLAGS_DEFAULT,
|
|
168
|
-
type_slots_BackgroundEnergyDiagnostics_Static};
|
|
169
|
-
|
|
170
|
-
// ----- ForegroundEnergyDiagnostics class --------------------
|
|
171
|
-
|
|
172
|
-
static PyObject* _new_ForegroundEnergyDiagnostics(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
173
|
-
{
|
|
174
|
-
static_assert(py::py_type<winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics>::type_name);
|
|
175
|
-
py::set_invalid_activation_error(py::py_type<winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics>::type_name);
|
|
176
|
-
return nullptr;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
static PyObject* ForegroundEnergyDiagnostics_ComputeTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
180
|
-
{
|
|
181
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
182
|
-
|
|
183
|
-
if (arg_count == 0)
|
|
184
|
-
{
|
|
185
|
-
try
|
|
186
|
-
{
|
|
187
|
-
static std::optional<bool> is_overload_present{};
|
|
188
|
-
|
|
189
|
-
if (!is_overload_present.has_value())
|
|
190
|
-
{
|
|
191
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (!is_overload_present.value())
|
|
195
|
-
{
|
|
196
|
-
py::set_arg_count_version_error(0);
|
|
197
|
-
return nullptr;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return py::convert([&]()
|
|
201
|
-
{
|
|
202
|
-
auto _gil = release_gil();
|
|
203
|
-
return winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::ComputeTotalEnergyUsage();
|
|
204
|
-
}());
|
|
205
|
-
}
|
|
206
|
-
catch (...)
|
|
207
|
-
{
|
|
208
|
-
py::to_PyErr();
|
|
209
|
-
return nullptr;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
else
|
|
213
|
-
{
|
|
214
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
215
|
-
return nullptr;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
static PyObject* ForegroundEnergyDiagnostics_ResetTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
220
|
-
{
|
|
221
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
222
|
-
|
|
223
|
-
if (arg_count == 0)
|
|
224
|
-
{
|
|
225
|
-
try
|
|
226
|
-
{
|
|
227
|
-
static std::optional<bool> is_overload_present{};
|
|
228
|
-
|
|
229
|
-
if (!is_overload_present.has_value())
|
|
230
|
-
{
|
|
231
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
if (!is_overload_present.value())
|
|
235
|
-
{
|
|
236
|
-
py::set_arg_count_version_error(0);
|
|
237
|
-
return nullptr;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
{
|
|
241
|
-
auto _gil = release_gil();
|
|
242
|
-
winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::ResetTotalEnergyUsage();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
Py_RETURN_NONE;
|
|
246
|
-
}
|
|
247
|
-
catch (...)
|
|
248
|
-
{
|
|
249
|
-
py::to_PyErr();
|
|
250
|
-
return nullptr;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
else
|
|
254
|
-
{
|
|
255
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
256
|
-
return nullptr;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
static PyObject* ForegroundEnergyDiagnostics_get_DeviceSpecificConversionFactor(PyObject* /*unused*/, void* /*unused*/) noexcept
|
|
261
|
-
{
|
|
262
|
-
try
|
|
263
|
-
{
|
|
264
|
-
static std::optional<bool> is_property_present{};
|
|
265
|
-
|
|
266
|
-
if (!is_property_present.has_value())
|
|
267
|
-
{
|
|
268
|
-
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"DeviceSpecificConversionFactor");
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
if (!is_property_present.value())
|
|
272
|
-
{
|
|
273
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
274
|
-
return nullptr;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
return py::convert([&]()
|
|
278
|
-
{
|
|
279
|
-
auto _gil = release_gil();
|
|
280
|
-
return winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::DeviceSpecificConversionFactor();
|
|
281
|
-
}());
|
|
282
|
-
}
|
|
283
|
-
catch (...)
|
|
284
|
-
{
|
|
285
|
-
py::to_PyErr();
|
|
286
|
-
return nullptr;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
static PyMethodDef _methods_ForegroundEnergyDiagnostics[] = {
|
|
291
|
-
{ }};
|
|
292
|
-
|
|
293
|
-
static PyGetSetDef _getset_ForegroundEnergyDiagnostics[] = {
|
|
294
|
-
{ }};
|
|
295
|
-
|
|
296
|
-
static PyType_Slot _type_slots_ForegroundEnergyDiagnostics[] = {
|
|
297
|
-
{ Py_tp_new, reinterpret_cast<void*>(_new_ForegroundEnergyDiagnostics) },
|
|
298
|
-
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ForegroundEnergyDiagnostics) },
|
|
299
|
-
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ForegroundEnergyDiagnostics) },
|
|
300
|
-
{ }};
|
|
301
|
-
|
|
302
|
-
static PyType_Spec type_spec_ForegroundEnergyDiagnostics = {
|
|
303
|
-
"winrt._winrt_windows_system_power_diagnostics.ForegroundEnergyDiagnostics",
|
|
304
|
-
0,
|
|
305
|
-
0,
|
|
306
|
-
Py_TPFLAGS_DEFAULT,
|
|
307
|
-
_type_slots_ForegroundEnergyDiagnostics};
|
|
308
|
-
|
|
309
|
-
static PyGetSetDef getset_ForegroundEnergyDiagnostics_Static[] = {
|
|
310
|
-
{ "device_specific_conversion_factor", reinterpret_cast<getter>(ForegroundEnergyDiagnostics_get_DeviceSpecificConversionFactor), nullptr, nullptr, nullptr },
|
|
311
|
-
{ }};
|
|
312
|
-
|
|
313
|
-
static PyMethodDef methods_ForegroundEnergyDiagnostics_Static[] = {
|
|
314
|
-
{ "compute_total_energy_usage", reinterpret_cast<PyCFunction>(ForegroundEnergyDiagnostics_ComputeTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
315
|
-
{ "reset_total_energy_usage", reinterpret_cast<PyCFunction>(ForegroundEnergyDiagnostics_ResetTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
316
|
-
{ }};
|
|
317
|
-
|
|
318
|
-
static PyType_Slot type_slots_ForegroundEnergyDiagnostics_Static[] =
|
|
319
|
-
{
|
|
320
|
-
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
321
|
-
{ Py_tp_getset, reinterpret_cast<void*>(getset_ForegroundEnergyDiagnostics_Static) },
|
|
322
|
-
{ Py_tp_methods, reinterpret_cast<void*>(methods_ForegroundEnergyDiagnostics_Static) },
|
|
323
|
-
{ }
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
static PyType_Spec type_spec_ForegroundEnergyDiagnostics_Static = {
|
|
327
|
-
"winrt._winrt_windows_system_power_diagnostics.ForegroundEnergyDiagnostics_Static",
|
|
328
|
-
static_cast<int>(PyType_Type.tp_basicsize),
|
|
329
|
-
static_cast<int>(PyType_Type.tp_itemsize),
|
|
330
|
-
Py_TPFLAGS_DEFAULT,
|
|
331
|
-
type_slots_ForegroundEnergyDiagnostics_Static};
|
|
332
|
-
|
|
333
|
-
// ----- Windows.System.Power.Diagnostics Initialization --------------------
|
|
334
|
-
|
|
335
|
-
PyDoc_STRVAR(module_doc, "Windows.System.Power.Diagnostics");
|
|
336
|
-
|
|
337
|
-
static PyModuleDef module_def = {
|
|
338
|
-
PyModuleDef_HEAD_INIT,
|
|
339
|
-
"_winrt_windows_system_power_diagnostics",
|
|
340
|
-
module_doc,
|
|
341
|
-
0,
|
|
342
|
-
nullptr,
|
|
343
|
-
nullptr,
|
|
344
|
-
nullptr,
|
|
345
|
-
nullptr,
|
|
346
|
-
nullptr};
|
|
347
|
-
} // py::cpp::Windows::System::Power::Diagnostics
|
|
348
|
-
|
|
349
|
-
PyMODINIT_FUNC PyInit__winrt_windows_system_power_diagnostics(void) noexcept
|
|
350
|
-
{
|
|
351
|
-
using namespace py::cpp::Windows::System::Power::Diagnostics;
|
|
352
|
-
|
|
353
|
-
if (py::import_winrt_runtime() == -1)
|
|
354
|
-
{
|
|
355
|
-
return nullptr;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
359
|
-
|
|
360
|
-
if (!module)
|
|
361
|
-
{
|
|
362
|
-
return nullptr;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
auto inspectable_meta_type = py::get_inspectable_meta_type();
|
|
366
|
-
if (!inspectable_meta_type)
|
|
367
|
-
{
|
|
368
|
-
return nullptr;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
auto object_type = py::get_object_type();
|
|
372
|
-
if (!object_type)
|
|
373
|
-
{
|
|
374
|
-
return nullptr;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
378
|
-
|
|
379
|
-
if (!object_bases)
|
|
380
|
-
{
|
|
381
|
-
return nullptr;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
py::pyobj_handle BackgroundEnergyDiagnostics_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
|
|
385
|
-
if (!BackgroundEnergyDiagnostics_Static_bases)
|
|
386
|
-
{
|
|
387
|
-
return nullptr;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
py::pyobj_handle type_BackgroundEnergyDiagnostics_Static{PyType_FromSpecWithBases(&type_spec_BackgroundEnergyDiagnostics_Static, BackgroundEnergyDiagnostics_Static_bases.get())};
|
|
391
|
-
if (!type_BackgroundEnergyDiagnostics_Static)
|
|
392
|
-
{
|
|
393
|
-
return nullptr;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
py::pytype_handle BackgroundEnergyDiagnostics_type{py::register_python_type(module.get(), &type_spec_BackgroundEnergyDiagnostics, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_BackgroundEnergyDiagnostics_Static.get()))};
|
|
397
|
-
if (!BackgroundEnergyDiagnostics_type)
|
|
398
|
-
{
|
|
399
|
-
return nullptr;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
py::pyobj_handle ForegroundEnergyDiagnostics_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
|
|
403
|
-
if (!ForegroundEnergyDiagnostics_Static_bases)
|
|
404
|
-
{
|
|
405
|
-
return nullptr;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
py::pyobj_handle type_ForegroundEnergyDiagnostics_Static{PyType_FromSpecWithBases(&type_spec_ForegroundEnergyDiagnostics_Static, ForegroundEnergyDiagnostics_Static_bases.get())};
|
|
409
|
-
if (!type_ForegroundEnergyDiagnostics_Static)
|
|
410
|
-
{
|
|
411
|
-
return nullptr;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
py::pytype_handle ForegroundEnergyDiagnostics_type{py::register_python_type(module.get(), &type_spec_ForegroundEnergyDiagnostics, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ForegroundEnergyDiagnostics_Static.get()))};
|
|
415
|
-
if (!ForegroundEnergyDiagnostics_type)
|
|
416
|
-
{
|
|
417
|
-
return nullptr;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
return module.detach();
|
|
422
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
-
|
|
3
|
-
[build-system]
|
|
4
|
-
requires = ["setuptools>=78", "winrt-sdk"]
|
|
5
|
-
build-backend = "setuptools.build_meta"
|
|
6
|
-
|
|
7
|
-
[project]
|
|
8
|
-
name = "winrt-Windows.System.Power.Diagnostics"
|
|
9
|
-
description = "Python projection of Windows Runtime (WinRT) APIs"
|
|
10
|
-
readme = "README.md"
|
|
11
|
-
license = "MIT"
|
|
12
|
-
classifiers = [
|
|
13
|
-
"Operating System :: Microsoft :: Windows",
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Programming Language :: Python :: Implementation :: CPython",
|
|
16
|
-
"Intended Audience :: Developers",
|
|
17
|
-
]
|
|
18
|
-
dynamic = ["version", "dependencies"]
|
|
19
|
-
requires-python = ">=3.9"
|
|
20
|
-
|
|
21
|
-
[project.urls]
|
|
22
|
-
# Homepage = "https://github.com/pywinrt/pywinrt"
|
|
23
|
-
Documentation = "https://pywinrt.readthedocs.io"
|
|
24
|
-
Repository = "https://github.com/pywinrt/pywinrt"
|
|
25
|
-
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
|
|
26
|
-
|
|
27
|
-
[tool.setuptools.dynamic]
|
|
28
|
-
version = { file = "pywinrt-version.txt" }
|
|
29
|
-
dependencies = { file = "requirements.txt" }
|
|
30
|
-
|
|
31
|
-
[tool.setuptools.package-data]
|
|
32
|
-
"*" = ["*.pyi", "py.typed"]
|
|
33
|
-
|
|
34
|
-
[tool.cibuildwheel]
|
|
35
|
-
# use local winrt-sdk build dependency
|
|
36
|
-
environment = { PYTHONPATH="../../winrt-sdk/src" }
|
|
37
|
-
# don't install winrt-sdk from PyPI
|
|
38
|
-
build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
39
|
-
before-build = "uv pip install setuptools"
|
|
40
|
-
# don't build for PyPy
|
|
41
|
-
skip = "pp*"
|
|
42
|
-
# suppress warnings about ARM64 testing
|
|
43
|
-
test-skip = "*-win_arm64"
|
|
44
|
-
|
|
45
|
-
[tool.cibuildwheel.windows]
|
|
46
|
-
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.2.1
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
-
|
|
3
|
-
from setuptools import Extension, setup
|
|
4
|
-
from setuptools.command.build_ext import build_ext
|
|
5
|
-
from winrt_sdk import get_include_dirs
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class build_ext_ex(build_ext):
|
|
9
|
-
def build_extension(self, ext):
|
|
10
|
-
if self.compiler.compiler_type == "msvc":
|
|
11
|
-
ext.extra_compile_args = ["/std:c++20", "/permissive-"]
|
|
12
|
-
elif self.compiler.compiler_type == "mingw32":
|
|
13
|
-
ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
|
|
14
|
-
# GCC 15 complains about some things that it didn't in the past
|
|
15
|
-
ext.extra_compile_args += ["-Wno-strict-aliasing", "-Wno-template-body"]
|
|
16
|
-
ext.extra_link_args = ["-loleaut32"]
|
|
17
|
-
else:
|
|
18
|
-
raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
|
|
19
|
-
|
|
20
|
-
build_ext.build_extension(self, ext)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
setup(
|
|
24
|
-
cmdclass={"build_ext": build_ext_ex},
|
|
25
|
-
ext_modules=[
|
|
26
|
-
Extension(
|
|
27
|
-
"winrt._winrt_windows_system_power_diagnostics",
|
|
28
|
-
sources=["py.Windows.System.Power.Diagnostics.cpp"],
|
|
29
|
-
include_dirs=get_include_dirs(),
|
|
30
|
-
libraries=["windowsapp"],
|
|
31
|
-
)
|
|
32
|
-
],
|
|
33
|
-
)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: winrt-Windows.System.Power.Diagnostics
|
|
3
|
-
Version: 3.2.1
|
|
4
|
-
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
-
License-Expression: MIT
|
|
6
|
-
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
7
|
-
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
8
|
-
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
9
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime~=3.2.1.0
|
|
16
|
-
|
|
17
|
-
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
18
|
-
|
|
19
|
-
# winrt-Windows.System.Power.Diagnostics
|
|
20
|
-
|
|
21
|
-
Windows Runtime (WinRT) APIs for for the `Windows.System.Power.Diagnostics` namespace.
|
|
22
|
-
|
|
23
|
-
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
README.md
|
|
2
|
-
py.Windows.System.Power.Diagnostics.cpp
|
|
3
|
-
pyproject.toml
|
|
4
|
-
pywinrt-version.txt
|
|
5
|
-
requirements.txt
|
|
6
|
-
setup.py
|
|
7
|
-
winrt/_winrt_windows_system_power_diagnostics.pyi
|
|
8
|
-
winrt/windows/system/power/diagnostics/__init__.py
|
|
9
|
-
winrt/windows/system/power/diagnostics/py.typed
|
|
10
|
-
winrt_Windows.System.Power.Diagnostics.egg-info/PKG-INFO
|
|
11
|
-
winrt_Windows.System.Power.Diagnostics.egg-info/SOURCES.txt
|
|
12
|
-
winrt_Windows.System.Power.Diagnostics.egg-info/dependency_links.txt
|
|
13
|
-
winrt_Windows.System.Power.Diagnostics.egg-info/requires.txt
|
|
14
|
-
winrt_Windows.System.Power.Diagnostics.egg-info/top_level.txt
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
winrt-runtime~=3.2.1.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
winrt
|