winrt-Windows.System.Power.Diagnostics 2.0.0b2__tar.gz → 2.1.0__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.
Files changed (19) hide show
  1. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/PKG-INFO +2 -1
  2. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/py.Windows.System.Power.Diagnostics.cpp +56 -64
  3. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/pyproject.toml +2 -2
  4. winrt_windows_system_power_diagnostics-2.1.0/pywinrt-version.txt +1 -0
  5. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/requirements.txt +2 -2
  6. winrt_windows_system_power_diagnostics-2.1.0/setup.py +31 -0
  7. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/winrt/_winrt_windows_system_power_diagnostics.pyi +3 -5
  8. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/winrt/windows/system/power/diagnostics/__init__.py +1 -1
  9. winrt_windows_system_power_diagnostics-2.1.0/winrt/windows/system/power/diagnostics/py.typed +0 -0
  10. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/winrt_Windows.System.Power.Diagnostics.egg-info/PKG-INFO +2 -1
  11. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/winrt_Windows.System.Power.Diagnostics.egg-info/SOURCES.txt +1 -0
  12. winrt_windows_system_power_diagnostics-2.1.0/winrt_Windows.System.Power.Diagnostics.egg-info/requires.txt +1 -0
  13. winrt-Windows.System.Power.Diagnostics-2.0.0b2/pywinrt-version.txt +0 -1
  14. winrt-Windows.System.Power.Diagnostics-2.0.0b2/setup.py +0 -16
  15. winrt-Windows.System.Power.Diagnostics-2.0.0b2/winrt_Windows.System.Power.Diagnostics.egg-info/requires.txt +0 -1
  16. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/README.md +0 -0
  17. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/setup.cfg +0 -0
  18. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/winrt_Windows.System.Power.Diagnostics.egg-info/dependency_links.txt +0 -0
  19. {winrt-Windows.System.Power.Diagnostics-2.0.0b2 → winrt_windows_system_power_diagnostics-2.1.0}/winrt_Windows.System.Power.Diagnostics.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Power.Diagnostics
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
 
16
17
  <!-- warning: Please don't edit this file. It was automatically generated. -->
17
18
 
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  #include "py.Windows.System.Power.Diagnostics.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Power::Diagnostics
7
6
  {
8
7
  // ----- BackgroundEnergyDiagnostics class --------------------
@@ -20,14 +19,14 @@ namespace py::cpp::Windows::System::Power::Diagnostics
20
19
 
21
20
  if (arg_count == 0)
22
21
  {
23
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0))
24
- {
25
- py::set_arg_count_version_error(0);
26
- return nullptr;
27
- }
28
-
29
22
  try
30
23
  {
24
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0))
25
+ {
26
+ py::set_arg_count_version_error(0);
27
+ return nullptr;
28
+ }
29
+
31
30
  return py::convert(winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::ComputeTotalEnergyUsage());
32
31
  }
33
32
  catch (...)
@@ -49,14 +48,14 @@ namespace py::cpp::Windows::System::Power::Diagnostics
49
48
 
50
49
  if (arg_count == 0)
51
50
  {
52
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0))
53
- {
54
- py::set_arg_count_version_error(0);
55
- return nullptr;
56
- }
57
-
58
51
  try
59
52
  {
53
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0))
54
+ {
55
+ py::set_arg_count_version_error(0);
56
+ return nullptr;
57
+ }
58
+
60
59
  winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::ResetTotalEnergyUsage();
61
60
  Py_RETURN_NONE;
62
61
  }
@@ -75,14 +74,14 @@ namespace py::cpp::Windows::System::Power::Diagnostics
75
74
 
76
75
  static PyObject* BackgroundEnergyDiagnostics_get_DeviceSpecificConversionFactor(PyObject* /*unused*/, void* /*unused*/) noexcept
77
76
  {
78
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"DeviceSpecificConversionFactor"))
79
- {
80
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
81
- return nullptr;
82
- }
83
-
84
77
  try
85
78
  {
79
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"DeviceSpecificConversionFactor"))
80
+ {
81
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
82
+ return nullptr;
83
+ }
84
+
86
85
  return py::convert(winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::DeviceSpecificConversionFactor());
87
86
  }
88
87
  catch (...)
@@ -100,22 +99,19 @@ namespace py::cpp::Windows::System::Power::Diagnostics
100
99
  { }
101
100
  };
102
101
 
103
- static PyType_Slot _type_slots_BackgroundEnergyDiagnostics[] =
104
- {
102
+ static PyType_Slot _type_slots_BackgroundEnergyDiagnostics[] = {
105
103
  { Py_tp_new, reinterpret_cast<void*>(_new_BackgroundEnergyDiagnostics) },
106
104
  { Py_tp_methods, reinterpret_cast<void*>(_methods_BackgroundEnergyDiagnostics) },
107
105
  { Py_tp_getset, reinterpret_cast<void*>(_getset_BackgroundEnergyDiagnostics) },
108
- { },
106
+ { }
109
107
  };
110
108
 
111
- static PyType_Spec type_spec_BackgroundEnergyDiagnostics =
112
- {
109
+ static PyType_Spec type_spec_BackgroundEnergyDiagnostics = {
113
110
  "winrt._winrt_windows_system_power_diagnostics.BackgroundEnergyDiagnostics",
114
111
  0,
115
112
  0,
116
113
  Py_TPFLAGS_DEFAULT,
117
- _type_slots_BackgroundEnergyDiagnostics
118
- };
114
+ _type_slots_BackgroundEnergyDiagnostics};
119
115
 
120
116
  static PyGetSetDef getset_BackgroundEnergyDiagnostics_Static[] = {
121
117
  { "device_specific_conversion_factor", reinterpret_cast<getter>(BackgroundEnergyDiagnostics_get_DeviceSpecificConversionFactor), nullptr, nullptr, nullptr },
@@ -160,14 +156,14 @@ namespace py::cpp::Windows::System::Power::Diagnostics
160
156
 
161
157
  if (arg_count == 0)
162
158
  {
163
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0))
164
- {
165
- py::set_arg_count_version_error(0);
166
- return nullptr;
167
- }
168
-
169
159
  try
170
160
  {
161
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0))
162
+ {
163
+ py::set_arg_count_version_error(0);
164
+ return nullptr;
165
+ }
166
+
171
167
  return py::convert(winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::ComputeTotalEnergyUsage());
172
168
  }
173
169
  catch (...)
@@ -189,14 +185,14 @@ namespace py::cpp::Windows::System::Power::Diagnostics
189
185
 
190
186
  if (arg_count == 0)
191
187
  {
192
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0))
193
- {
194
- py::set_arg_count_version_error(0);
195
- return nullptr;
196
- }
197
-
198
188
  try
199
189
  {
190
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0))
191
+ {
192
+ py::set_arg_count_version_error(0);
193
+ return nullptr;
194
+ }
195
+
200
196
  winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::ResetTotalEnergyUsage();
201
197
  Py_RETURN_NONE;
202
198
  }
@@ -215,14 +211,14 @@ namespace py::cpp::Windows::System::Power::Diagnostics
215
211
 
216
212
  static PyObject* ForegroundEnergyDiagnostics_get_DeviceSpecificConversionFactor(PyObject* /*unused*/, void* /*unused*/) noexcept
217
213
  {
218
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"DeviceSpecificConversionFactor"))
219
- {
220
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
221
- return nullptr;
222
- }
223
-
224
214
  try
225
215
  {
216
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"DeviceSpecificConversionFactor"))
217
+ {
218
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
219
+ return nullptr;
220
+ }
221
+
226
222
  return py::convert(winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::DeviceSpecificConversionFactor());
227
223
  }
228
224
  catch (...)
@@ -240,22 +236,19 @@ namespace py::cpp::Windows::System::Power::Diagnostics
240
236
  { }
241
237
  };
242
238
 
243
- static PyType_Slot _type_slots_ForegroundEnergyDiagnostics[] =
244
- {
239
+ static PyType_Slot _type_slots_ForegroundEnergyDiagnostics[] = {
245
240
  { Py_tp_new, reinterpret_cast<void*>(_new_ForegroundEnergyDiagnostics) },
246
241
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ForegroundEnergyDiagnostics) },
247
242
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ForegroundEnergyDiagnostics) },
248
- { },
243
+ { }
249
244
  };
250
245
 
251
- static PyType_Spec type_spec_ForegroundEnergyDiagnostics =
252
- {
246
+ static PyType_Spec type_spec_ForegroundEnergyDiagnostics = {
253
247
  "winrt._winrt_windows_system_power_diagnostics.ForegroundEnergyDiagnostics",
254
248
  0,
255
249
  0,
256
250
  Py_TPFLAGS_DEFAULT,
257
- _type_slots_ForegroundEnergyDiagnostics
258
- };
251
+ _type_slots_ForegroundEnergyDiagnostics};
259
252
 
260
253
  static PyGetSetDef getset_ForegroundEnergyDiagnostics_Static[] = {
261
254
  { "device_specific_conversion_factor", reinterpret_cast<getter>(ForegroundEnergyDiagnostics_get_DeviceSpecificConversionFactor), nullptr, nullptr, nullptr },
@@ -286,20 +279,19 @@ namespace py::cpp::Windows::System::Power::Diagnostics
286
279
  };
287
280
 
288
281
  // ----- Windows.System.Power.Diagnostics Initialization --------------------
289
- PyDoc_STRVAR(module_doc, "Windows::System::Power::Diagnostics");
290
282
 
283
+ PyDoc_STRVAR(module_doc, "Windows.System.Power.Diagnostics");
291
284
 
292
- static PyModuleDef module_def
293
- = {PyModuleDef_HEAD_INIT,
294
- "_winrt_windows_system_power_diagnostics",
295
- module_doc,
296
- 0,
297
- nullptr,
298
- nullptr,
299
- nullptr,
300
- nullptr,
301
- nullptr};
302
-
285
+ static PyModuleDef module_def = {
286
+ PyModuleDef_HEAD_INIT,
287
+ "_winrt_windows_system_power_diagnostics",
288
+ module_doc,
289
+ 0,
290
+ nullptr,
291
+ nullptr,
292
+ nullptr,
293
+ nullptr,
294
+ nullptr};
303
295
  } // py::cpp::Windows::System::Power::Diagnostics
304
296
 
305
297
  PyMODINIT_FUNC PyInit__winrt_windows_system_power_diagnostics(void) noexcept
@@ -1,7 +1,7 @@
1
1
  # WARNING: Please don't edit this file. It was automatically generated.
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
4
+ requires = ["setuptools", "winrt-sdk"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
@@ -29,7 +29,7 @@ version = { file = "pywinrt-version.txt" }
29
29
  dependencies = { file = "requirements.txt" }
30
30
 
31
31
  [tool.setuptools.package-data]
32
- winrt = ["*.pyi"]
32
+ "*" = ["*.pyi", "py.typed"]
33
33
 
34
34
  [tool.cibuildwheel]
35
35
  # use local winrt-sdk build dependency
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.0-beta.2
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,31 @@
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
+ ext.extra_link_args = ["-loleaut32"]
15
+ else:
16
+ raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
17
+
18
+ build_ext.build_extension(self, ext)
19
+
20
+
21
+ setup(
22
+ cmdclass = {'build_ext': build_ext_ex},
23
+ ext_modules=[
24
+ Extension(
25
+ "winrt._winrt_windows_system_power_diagnostics",
26
+ sources=["py.Windows.System.Power.Diagnostics.cpp"],
27
+ include_dirs=get_include_dirs(),
28
+ libraries=["windowsapp"],
29
+ )
30
+ ],
31
+ )
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -21,8 +21,7 @@ class BackgroundEnergyDiagnostics_Static(type):
21
21
 
22
22
  @typing.final
23
23
  class BackgroundEnergyDiagnostics(winrt.system.Object, metaclass=BackgroundEnergyDiagnostics_Static):
24
- @staticmethod
25
- def _from(obj: winrt.system.Object, /) -> BackgroundEnergyDiagnostics: ...
24
+ pass
26
25
 
27
26
  @typing.final
28
27
  class ForegroundEnergyDiagnostics_Static(type):
@@ -33,6 +32,5 @@ class ForegroundEnergyDiagnostics_Static(type):
33
32
 
34
33
  @typing.final
35
34
  class ForegroundEnergyDiagnostics(winrt.system.Object, metaclass=ForegroundEnergyDiagnostics_Static):
36
- @staticmethod
37
- def _from(obj: winrt.system.Object, /) -> ForegroundEnergyDiagnostics: ...
35
+ pass
38
36
 
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import winrt.system
4
4
  from winrt import _winrt_windows_system_power_diagnostics
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Power.Diagnostics
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
 
16
17
  <!-- warning: Please don't edit this file. It was automatically generated. -->
17
18
 
@@ -6,6 +6,7 @@ requirements.txt
6
6
  setup.py
7
7
  winrt/_winrt_windows_system_power_diagnostics.pyi
8
8
  winrt/windows/system/power/diagnostics/__init__.py
9
+ winrt/windows/system/power/diagnostics/py.typed
9
10
  winrt_Windows.System.Power.Diagnostics.egg-info/PKG-INFO
10
11
  winrt_Windows.System.Power.Diagnostics.egg-info/SOURCES.txt
11
12
  winrt_Windows.System.Power.Diagnostics.egg-info/dependency_links.txt
@@ -1,16 +0,0 @@
1
- # WARNING: Please don't edit this file. It was automatically generated.
2
-
3
- from setuptools import Extension, setup
4
- from winrt_sdk import get_include_dirs
5
-
6
- setup(
7
- ext_modules=[
8
- Extension(
9
- "winrt._winrt_windows_system_power_diagnostics",
10
- sources=["py.Windows.System.Power.Diagnostics.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- )