comtypes 1.4.3__zip → 1.4.5__zip

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 (132) hide show
  1. {comtypes-1.4.3 → comtypes-1.4.5}/CHANGES.txt +18 -0
  2. {comtypes-1.4.3/comtypes.egg-info → comtypes-1.4.5}/PKG-INFO +2 -3
  3. {comtypes-1.4.3 → comtypes-1.4.5}/README.md +0 -1
  4. comtypes-1.4.5/comtypes/__init__.py +268 -0
  5. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/_comobject.py +2 -1
  6. comtypes-1.4.5/comtypes/_idl_stuff.py +67 -0
  7. comtypes-1.4.5/comtypes/_post_coinit/__init__.py +15 -0
  8. comtypes-1.4.5/comtypes/_post_coinit/bstr.py +30 -0
  9. comtypes-1.4.5/comtypes/_post_coinit/misc.py +385 -0
  10. comtypes-1.4.5/comtypes/_post_coinit/unknwn.py +537 -0
  11. comtypes-1.4.5/comtypes/_py_instance_method.py +13 -0
  12. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/_safearray.py +3 -2
  13. comtypes-1.4.5/comtypes/_tlib_version_checker.py +18 -0
  14. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/automation.py +22 -6
  15. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/_generate.py +2 -1
  16. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/hints.pyi +34 -0
  17. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/safearray.py +11 -4
  18. comtypes-1.4.5/comtypes/stream.py +65 -0
  19. comtypes-1.4.5/comtypes/test/mylib.tlb +0 -0
  20. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_client.py +11 -0
  21. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_dispifc_records.py +1 -1
  22. comtypes-1.4.5/comtypes/test/test_dispifc_safearrays.py +89 -0
  23. comtypes-1.4.5/comtypes/test/test_istream.py +53 -0
  24. comtypes-1.4.5/comtypes/test/test_midl_safearray_create.py +100 -0
  25. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_wmi.py +11 -18
  26. comtypes-1.4.5/comtypes/test/urlhist.tlb +0 -0
  27. {comtypes-1.4.3 → comtypes-1.4.5/comtypes.egg-info}/PKG-INFO +2 -3
  28. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes.egg-info/SOURCES.txt +15 -0
  29. comtypes-1.4.5/pyproject.toml +3 -0
  30. comtypes-1.4.5/setup.cfg +52 -0
  31. comtypes-1.4.5/setup.py +117 -0
  32. comtypes-1.4.3/comtypes/__init__.py +0 -1229
  33. comtypes-1.4.3/setup.cfg +0 -4
  34. comtypes-1.4.3/setup.py +0 -173
  35. {comtypes-1.4.3 → comtypes-1.4.5}/LICENSE.txt +0 -0
  36. {comtypes-1.4.3 → comtypes-1.4.5}/MANIFEST.in +0 -0
  37. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/GUID.py +0 -0
  38. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/_memberspec.py +0 -0
  39. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/_meta.py +0 -0
  40. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/_npsupport.py +0 -0
  41. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/clear_cache.py +0 -0
  42. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/__init__.py +0 -0
  43. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/_code_cache.py +0 -0
  44. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/_constants.py +0 -0
  45. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/_events.py +0 -0
  46. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/dynamic.py +0 -0
  47. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/client/lazybind.py +0 -0
  48. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/connectionpoints.py +0 -0
  49. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/errorinfo.py +0 -0
  50. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/git.py +0 -0
  51. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/hresult.py +0 -0
  52. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/logutil.py +0 -0
  53. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/messageloop.py +0 -0
  54. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/patcher.py +0 -0
  55. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/persist.py +0 -0
  56. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/__init__.py +0 -0
  57. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/automation.py +0 -0
  58. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/connectionpoints.py +0 -0
  59. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/inprocserver.py +0 -0
  60. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/localserver.py +0 -0
  61. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/register.py +0 -0
  62. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/server/w_getopt.py +0 -0
  63. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/shelllink.py +0 -0
  64. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/TestComServer.idl +0 -0
  65. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/TestComServer.py +0 -0
  66. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/TestComServer.tlb +0 -0
  67. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/TestDispServer.idl +0 -0
  68. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/TestDispServer.py +0 -0
  69. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/TestDispServer.tlb +0 -0
  70. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/__init__.py +0 -0
  71. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/find_memleak.py +0 -0
  72. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/mylib.idl +0 -0
  73. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/mytypelib.idl +0 -0
  74. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/runtests.py +0 -0
  75. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/setup.py +0 -0
  76. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_BSTR.py +0 -0
  77. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_DISPPARAMS.py +0 -0
  78. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_GUID.py +0 -0
  79. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_QueryService.py +0 -0
  80. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_agilent.py +0 -0
  81. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_avmc.py +0 -0
  82. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_basic.py +0 -0
  83. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_casesensitivity.py +0 -0
  84. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_clear_cache.py +0 -0
  85. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_client_dynamic.py +0 -0
  86. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_client_regenerate_modules.py +0 -0
  87. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_collections.py +0 -0
  88. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_comserver.py +0 -0
  89. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_createwrappers.py +0 -0
  90. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_dict.py +0 -0
  91. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_dispinterface.py +0 -0
  92. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_dyndispatch.py +0 -0
  93. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_excel.py +0 -0
  94. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_findgendir.py +0 -0
  95. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_getactiveobj.py +0 -0
  96. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_ie.py +0 -0
  97. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_ienum.py +0 -0
  98. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_imfattributes.py +0 -0
  99. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_inout_args.py +0 -0
  100. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_jscript.js +0 -0
  101. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_msscript.py +0 -0
  102. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_npsupport.py +0 -0
  103. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_outparam.py +0 -0
  104. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_propputref.py +0 -0
  105. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_pump_events.py +0 -0
  106. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_safearray.py +0 -0
  107. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_sapi.py +0 -0
  108. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_server.py +0 -0
  109. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_showevents.py +0 -0
  110. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_subinterface.py +0 -0
  111. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_typeinfo.py +0 -0
  112. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_urlhistory.py +0 -0
  113. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_variant.py +0 -0
  114. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_win32com_interop.py +0 -0
  115. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/test/test_word.py +0 -0
  116. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/__init__.py +0 -0
  117. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/__init__.py +0 -0
  118. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/codegenerator.py +0 -0
  119. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/helpers.py +0 -0
  120. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/modulenamer.py +0 -0
  121. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/namespaces.py +0 -0
  122. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/packing.py +0 -0
  123. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/codegenerator/typeannotator.py +0 -0
  124. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/tlbparser.py +0 -0
  125. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/typedesc.py +0 -0
  126. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/tools/typedesc_base.py +0 -0
  127. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/typeinfo.py +0 -0
  128. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/util.py +0 -0
  129. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes/viewobject.py +0 -0
  130. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes.egg-info/dependency_links.txt +0 -0
  131. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes.egg-info/entry_points.txt +0 -0
  132. {comtypes-1.4.3 → comtypes-1.4.5}/comtypes.egg-info/top_level.txt +0 -0
@@ -0,0 +1,52 @@
1
+ [metadata]
2
+ name = comtypes
3
+ description = Pure Python COM package
4
+ author = Thomas Heller
5
+ author_email = theller@python.net
6
+ url = https://github.com/enthought/comtypes
7
+ download_url = https://github.com/enthought/comtypes/releases
8
+ version = attr:comtypes.__version__
9
+ long_description = file:README.md
10
+ long_description_content_type = text/markdown
11
+ classifiers =
12
+ Development Status :: 5 - Production/Stable
13
+ Intended Audience :: Developers
14
+ License :: OSI Approved :: MIT License
15
+ Operating System :: Microsoft :: Windows
16
+ Programming Language :: Python
17
+ Programming Language :: Python :: 3
18
+ Topic :: Software Development :: Libraries :: Python Modules
19
+
20
+ [options]
21
+ python_requires = >=3.7
22
+ packages =
23
+ comtypes
24
+ comtypes._post_coinit
25
+ comtypes.client
26
+ comtypes.server
27
+ comtypes.tools
28
+ comtypes.tools.codegenerator
29
+ comtypes.test
30
+
31
+ [options.package_data]
32
+ comtypes.test =
33
+ TestComServer.idl
34
+ TestComServer.tlb
35
+ TestDispServer.idl
36
+ TestDispServer.tlb
37
+ mytypelib.idl
38
+ mylib.idl
39
+ mylib.tlb
40
+ urlhist.tlb
41
+ test_jscript.js
42
+ comtypes =
43
+ hints.pyi
44
+
45
+ [options.entry_points]
46
+ console_scripts =
47
+ clear_comtypes_cache = comtypes.clear_cache:main
48
+
49
+ [egg_info]
50
+ tag_build =
51
+ tag_date = 0
52
+
@@ -0,0 +1,117 @@
1
+ """comtypes package install script"""
2
+
3
+ import sys
4
+ import os
5
+ import subprocess
6
+
7
+ from setuptools import Command, setup
8
+ from setuptools.command.install import install
9
+
10
+
11
+ class test(Command):
12
+ # Original version of this class posted
13
+ # by Berthold Hoellmann to distutils-sig@python.org
14
+ description = "run tests"
15
+
16
+ user_options = [
17
+ ('tests=', 't', "comma-separated list of packages that contain test modules"),
18
+ (
19
+ 'use-resources=',
20
+ 'u',
21
+ "resources to use - resource names are defined by tests",
22
+ ),
23
+ (
24
+ 'refcounts',
25
+ 'r',
26
+ "repeat tests to search for refcount leaks (requires "
27
+ "'sys.gettotalrefcount')",
28
+ ),
29
+ ]
30
+
31
+ boolean_options = ["refcounts"]
32
+
33
+ def initialize_options(self):
34
+ self.use_resources = ""
35
+ self.refcounts = False
36
+ self.tests = "comtypes.test"
37
+ self.failure = False
38
+
39
+ def finalize_options(self):
40
+ if self.refcounts and not hasattr(sys, "gettotalrefcount"):
41
+ raise Exception("refcount option requires Python debug build")
42
+ self.tests = self.tests.split(",")
43
+ self.use_resources = self.use_resources.split(",")
44
+
45
+ def run(self):
46
+ build = self.reinitialize_command('build')
47
+ build.run()
48
+ if build.build_lib is not None:
49
+ sys.path.insert(0, build.build_lib)
50
+
51
+ # Register our ATL COM tester dll
52
+ import comtypes.test
53
+
54
+ script_path = os.path.dirname(__file__)
55
+ source_dir = os.path.abspath(os.path.join(script_path, "source"))
56
+ comtypes.test.register_server(source_dir)
57
+
58
+ comtypes.test.use_resources.extend(self.use_resources)
59
+ for name in self.tests:
60
+ package = __import__(name, globals(), locals(), ['*'])
61
+ sys.stdout.write(
62
+ "Testing package %s %s\n" % (name, (sys.version, sys.platform, os.name))
63
+ )
64
+ package_failure = comtypes.test.run_tests(
65
+ package, "test_*.py", self.verbose, self.refcounts
66
+ )
67
+ self.failure = self.failure or package_failure
68
+
69
+
70
+ class post_install(install):
71
+ # both this static variable and method initialize_options() help to avoid
72
+ # weird setuptools error with "pip install comtypes", details are here:
73
+ # https://github.com/enthought/comtypes/issues/155
74
+ # the working solution was found here:
75
+ # https://github.com/pypa/setuptools/blob/3b90be7bb6323eb44d0f28864509c1d47aa098de/setuptools/command/install.py
76
+ user_options = install.user_options + [
77
+ ('old-and-unmanageable', None, "Try not to use this!"),
78
+ (
79
+ 'single-version-externally-managed',
80
+ None,
81
+ "used by system package builders to create 'flat' eggs",
82
+ ),
83
+ ]
84
+
85
+ def initialize_options(self):
86
+ install.initialize_options(self)
87
+ self.old_and_unmanageable = None
88
+ self.single_version_externally_managed = None
89
+
90
+ def run(self):
91
+ install.run(self)
92
+ # Custom script we run at the end of installing
93
+ if not self.dry_run and not self.root:
94
+ print("Executing post install script...")
95
+ print(f'"{sys.executable}" -m comtypes.clear_cache -y')
96
+ try:
97
+ subprocess.check_call([
98
+ sys.executable,
99
+ "-m",
100
+ "comtypes.clear_cache",
101
+ '-y',
102
+ ])
103
+ except subprocess.CalledProcessError:
104
+ print("Failed to run post install script!")
105
+
106
+
107
+ if __name__ == '__main__':
108
+ dist = setup(
109
+ cmdclass={
110
+ 'test': test,
111
+ 'install': post_install,
112
+ },
113
+ )
114
+ # Exit with a failure code if only running the tests and they failed
115
+ if dist.commands == ['test']:
116
+ command = dist.command_obj['test']
117
+ sys.exit(command.failure)