comtypes 1.4.3__zip → 1.4.4__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 (120) hide show
  1. {comtypes-1.4.3 → comtypes-1.4.4}/CHANGES.txt +6 -0
  2. {comtypes-1.4.3/comtypes.egg-info → comtypes-1.4.4}/PKG-INFO +2 -3
  3. {comtypes-1.4.3 → comtypes-1.4.4}/README.md +0 -1
  4. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/__init__.py +1 -1
  5. comtypes-1.4.4/comtypes/test/mylib.tlb +0 -0
  6. comtypes-1.4.4/comtypes/test/urlhist.tlb +0 -0
  7. {comtypes-1.4.3 → comtypes-1.4.4/comtypes.egg-info}/PKG-INFO +2 -3
  8. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes.egg-info/SOURCES.txt +4 -0
  9. comtypes-1.4.4/pyproject.toml +3 -0
  10. comtypes-1.4.4/setup.cfg +51 -0
  11. comtypes-1.4.4/setup.py +117 -0
  12. comtypes-1.4.3/setup.cfg +0 -4
  13. comtypes-1.4.3/setup.py +0 -173
  14. {comtypes-1.4.3 → comtypes-1.4.4}/LICENSE.txt +0 -0
  15. {comtypes-1.4.3 → comtypes-1.4.4}/MANIFEST.in +0 -0
  16. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/GUID.py +0 -0
  17. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/_comobject.py +0 -0
  18. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/_memberspec.py +0 -0
  19. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/_meta.py +0 -0
  20. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/_npsupport.py +0 -0
  21. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/_safearray.py +0 -0
  22. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/automation.py +0 -0
  23. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/clear_cache.py +0 -0
  24. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/__init__.py +0 -0
  25. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/_code_cache.py +0 -0
  26. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/_constants.py +0 -0
  27. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/_events.py +0 -0
  28. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/_generate.py +0 -0
  29. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/dynamic.py +0 -0
  30. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/client/lazybind.py +0 -0
  31. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/connectionpoints.py +0 -0
  32. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/errorinfo.py +0 -0
  33. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/git.py +0 -0
  34. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/hints.pyi +0 -0
  35. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/hresult.py +0 -0
  36. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/logutil.py +0 -0
  37. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/messageloop.py +0 -0
  38. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/patcher.py +0 -0
  39. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/persist.py +0 -0
  40. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/safearray.py +0 -0
  41. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/__init__.py +0 -0
  42. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/automation.py +0 -0
  43. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/connectionpoints.py +0 -0
  44. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/inprocserver.py +0 -0
  45. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/localserver.py +0 -0
  46. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/register.py +0 -0
  47. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/server/w_getopt.py +0 -0
  48. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/shelllink.py +0 -0
  49. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/TestComServer.idl +0 -0
  50. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/TestComServer.py +0 -0
  51. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/TestComServer.tlb +0 -0
  52. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/TestDispServer.idl +0 -0
  53. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/TestDispServer.py +0 -0
  54. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/TestDispServer.tlb +0 -0
  55. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/__init__.py +0 -0
  56. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/find_memleak.py +0 -0
  57. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/mylib.idl +0 -0
  58. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/mytypelib.idl +0 -0
  59. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/runtests.py +0 -0
  60. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/setup.py +0 -0
  61. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_BSTR.py +0 -0
  62. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_DISPPARAMS.py +0 -0
  63. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_GUID.py +0 -0
  64. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_QueryService.py +0 -0
  65. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_agilent.py +0 -0
  66. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_avmc.py +0 -0
  67. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_basic.py +0 -0
  68. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_casesensitivity.py +0 -0
  69. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_clear_cache.py +0 -0
  70. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_client.py +0 -0
  71. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_client_dynamic.py +0 -0
  72. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_client_regenerate_modules.py +0 -0
  73. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_collections.py +0 -0
  74. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_comserver.py +0 -0
  75. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_createwrappers.py +0 -0
  76. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_dict.py +0 -0
  77. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_dispifc_records.py +0 -0
  78. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_dispinterface.py +0 -0
  79. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_dyndispatch.py +0 -0
  80. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_excel.py +0 -0
  81. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_findgendir.py +0 -0
  82. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_getactiveobj.py +0 -0
  83. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_ie.py +0 -0
  84. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_ienum.py +0 -0
  85. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_imfattributes.py +0 -0
  86. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_inout_args.py +0 -0
  87. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_jscript.js +0 -0
  88. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_msscript.py +0 -0
  89. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_npsupport.py +0 -0
  90. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_outparam.py +0 -0
  91. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_propputref.py +0 -0
  92. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_pump_events.py +0 -0
  93. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_safearray.py +0 -0
  94. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_sapi.py +0 -0
  95. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_server.py +0 -0
  96. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_showevents.py +0 -0
  97. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_subinterface.py +0 -0
  98. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_typeinfo.py +0 -0
  99. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_urlhistory.py +0 -0
  100. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_variant.py +0 -0
  101. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_win32com_interop.py +0 -0
  102. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_wmi.py +0 -0
  103. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/test/test_word.py +0 -0
  104. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/__init__.py +0 -0
  105. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/__init__.py +0 -0
  106. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/codegenerator.py +0 -0
  107. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/helpers.py +0 -0
  108. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/modulenamer.py +0 -0
  109. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/namespaces.py +0 -0
  110. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/packing.py +0 -0
  111. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/codegenerator/typeannotator.py +0 -0
  112. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/tlbparser.py +0 -0
  113. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/typedesc.py +0 -0
  114. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/tools/typedesc_base.py +0 -0
  115. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/typeinfo.py +0 -0
  116. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/util.py +0 -0
  117. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes/viewobject.py +0 -0
  118. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes.egg-info/dependency_links.txt +0 -0
  119. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes.egg-info/entry_points.txt +0 -0
  120. {comtypes-1.4.3 → comtypes-1.4.4}/comtypes.egg-info/top_level.txt +0 -0
@@ -1,6 +1,12 @@
1
1
  Comtypes CHANGELOG
2
2
  ==================
3
3
 
4
+ Release 1.4.4
5
+ --------------
6
+ * Stop mentioning the last version supporting Windows CE in ``README.md``. By @forderud.
7
+ * Declare the minimum Python version as 3.7. By @jaraco.
8
+ * Move package configuration to declarative config. By @jaraco.
9
+
4
10
  Release 1.4.3
5
11
  --------------
6
12
  * Refactor ``test_findgendir``. By @junkmd.
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: comtypes
3
- Version: 1.4.3
3
+ Version: 1.4.4
4
4
  Summary: Pure Python COM package
5
5
  Home-page: https://github.com/enthought/comtypes
6
6
  Download-URL: https://github.com/enthought/comtypes/releases
7
7
  Author: Thomas Heller
8
8
  Author-email: theller@python.net
9
- License: MIT License
10
9
  Classifier: Development Status :: 5 - Production/Stable
11
10
  Classifier: Intended Audience :: Developers
12
11
  Classifier: License :: OSI Approved :: MIT License
@@ -14,6 +13,7 @@ Classifier: Operating System :: Microsoft :: Windows
14
13
  Classifier: Programming Language :: Python
15
14
  Classifier: Programming Language :: Python :: 3
16
15
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.7
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE.txt
19
19
 
@@ -31,7 +31,6 @@ License-File: LICENSE.txt
31
31
  `comtypes` allows to define, call, and implement custom and dispatch-based COM interfaces in pure `Python`.
32
32
 
33
33
  This package works on Windows only.
34
- - [`comtypes==1.1.7`](https://pypi.org/project/comtypes/1.1.7/) is the last version supporting Windows CE.
35
34
 
36
35
  Available on `Python` 3.7-3.12.
37
36
  - [`comtypes==1.2.1`](https://pypi.org/project/comtypes/1.2.1/) is the last version supporting `Python` 2.7 and 3.3-3.6.
@@ -12,7 +12,6 @@
12
12
  `comtypes` allows to define, call, and implement custom and dispatch-based COM interfaces in pure `Python`.
13
13
 
14
14
  This package works on Windows only.
15
- - [`comtypes==1.1.7`](https://pypi.org/project/comtypes/1.1.7/) is the last version supporting Windows CE.
16
15
 
17
16
  Available on `Python` 3.7-3.12.
18
17
  - [`comtypes==1.2.1`](https://pypi.org/project/comtypes/1.2.1/) is the last version supporting `Python` 2.7 and 3.3-3.6.
@@ -1,5 +1,5 @@
1
1
  # comtypes version numbers follow semver (http://semver.org/) and PEP 440
2
- __version__ = "1.4.3"
2
+ __version__ = "1.4.4"
3
3
 
4
4
  import atexit
5
5
  from ctypes import *
Binary file
Binary file
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: comtypes
3
- Version: 1.4.3
3
+ Version: 1.4.4
4
4
  Summary: Pure Python COM package
5
5
  Home-page: https://github.com/enthought/comtypes
6
6
  Download-URL: https://github.com/enthought/comtypes/releases
7
7
  Author: Thomas Heller
8
8
  Author-email: theller@python.net
9
- License: MIT License
10
9
  Classifier: Development Status :: 5 - Production/Stable
11
10
  Classifier: Intended Audience :: Developers
12
11
  Classifier: License :: OSI Approved :: MIT License
@@ -14,6 +13,7 @@ Classifier: Operating System :: Microsoft :: Windows
14
13
  Classifier: Programming Language :: Python
15
14
  Classifier: Programming Language :: Python :: 3
16
15
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.7
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE.txt
19
19
 
@@ -31,7 +31,6 @@ License-File: LICENSE.txt
31
31
  `comtypes` allows to define, call, and implement custom and dispatch-based COM interfaces in pure `Python`.
32
32
 
33
33
  This package works on Windows only.
34
- - [`comtypes==1.1.7`](https://pypi.org/project/comtypes/1.1.7/) is the last version supporting Windows CE.
35
34
 
36
35
  Available on `Python` 3.7-3.12.
37
36
  - [`comtypes==1.2.1`](https://pypi.org/project/comtypes/1.2.1/) is the last version supporting `Python` 2.7 and 3.3-3.6.
@@ -2,6 +2,8 @@ CHANGES.txt
2
2
  LICENSE.txt
3
3
  MANIFEST.in
4
4
  README.md
5
+ pyproject.toml
6
+ setup.cfg
5
7
  setup.py
6
8
  comtypes/GUID.py
7
9
  comtypes/__init__.py
@@ -54,6 +56,7 @@ comtypes/test/TestDispServer.tlb
54
56
  comtypes/test/__init__.py
55
57
  comtypes/test/find_memleak.py
56
58
  comtypes/test/mylib.idl
59
+ comtypes/test/mylib.tlb
57
60
  comtypes/test/mytypelib.idl
58
61
  comtypes/test/runtests.py
59
62
  comtypes/test/setup.py
@@ -100,6 +103,7 @@ comtypes/test/test_variant.py
100
103
  comtypes/test/test_win32com_interop.py
101
104
  comtypes/test/test_wmi.py
102
105
  comtypes/test/test_word.py
106
+ comtypes/test/urlhist.tlb
103
107
  comtypes/tools/__init__.py
104
108
  comtypes/tools/tlbparser.py
105
109
  comtypes/tools/typedesc.py
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.2"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,51 @@
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.client
25
+ comtypes.server
26
+ comtypes.tools
27
+ comtypes.tools.codegenerator
28
+ comtypes.test
29
+
30
+ [options.package_data]
31
+ comtypes.test =
32
+ TestComServer.idl
33
+ TestComServer.tlb
34
+ TestDispServer.idl
35
+ TestDispServer.tlb
36
+ mytypelib.idl
37
+ mylib.idl
38
+ mylib.tlb
39
+ urlhist.tlb
40
+ test_jscript.js
41
+ comtypes =
42
+ hints.pyi
43
+
44
+ [options.entry_points]
45
+ console_scripts =
46
+ clear_comtypes_cache = comtypes.clear_cache:main
47
+
48
+ [egg_info]
49
+ tag_build =
50
+ tag_date = 0
51
+
@@ -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)
comtypes-1.4.3/setup.cfg DELETED
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
comtypes-1.4.3/setup.py DELETED
@@ -1,173 +0,0 @@
1
- """comtypes package install script"""
2
- import sys
3
- import os
4
- import subprocess
5
-
6
- from setuptools import Command, setup
7
- from setuptools.command.install import install
8
- from setuptools.command.build_py import build_py
9
-
10
-
11
- with open('README.md') as readme_stream:
12
- readme = readme_stream.read()
13
-
14
-
15
- class test(Command):
16
- # Original version of this class posted
17
- # by Berthold Hoellmann to distutils-sig@python.org
18
- description = "run tests"
19
-
20
- user_options = [
21
- ('tests=', 't',
22
- "comma-separated list of packages that contain test modules"),
23
- ('use-resources=', 'u',
24
- "resources to use - resource names are defined by tests"),
25
- ('refcounts', 'r',
26
- "repeat tests to search for refcount leaks (requires "
27
- "'sys.gettotalrefcount')"),
28
- ]
29
-
30
- boolean_options = ["refcounts"]
31
-
32
- def initialize_options(self):
33
- self.use_resources = ""
34
- self.refcounts = False
35
- self.tests = "comtypes.test"
36
- self.failure = False
37
-
38
- def finalize_options(self):
39
- if self.refcounts and not hasattr(sys, "gettotalrefcount"):
40
- raise Exception("refcount option requires Python debug build")
41
- self.tests = self.tests.split(",")
42
- self.use_resources = self.use_resources.split(",")
43
-
44
- def run(self):
45
- build = self.reinitialize_command('build')
46
- build.run()
47
- if build.build_lib is not None:
48
- sys.path.insert(0, build.build_lib)
49
-
50
- # Register our ATL COM tester dll
51
- import comtypes.test
52
- script_path = os.path.dirname(__file__)
53
- source_dir = os.path.abspath(os.path.join(script_path, "source"))
54
- comtypes.test.register_server(source_dir)
55
-
56
- comtypes.test.use_resources.extend(self.use_resources)
57
- for name in self.tests:
58
- package = __import__(name, globals(), locals(), ['*'])
59
- sys.stdout.write("Testing package %s %s\n"
60
- % (name, (sys.version, sys.platform, os.name)))
61
- package_failure = comtypes.test.run_tests(package,
62
- "test_*.py",
63
- self.verbose,
64
- self.refcounts)
65
- self.failure = self.failure or package_failure
66
-
67
-
68
- classifiers = [
69
- 'Development Status :: 5 - Production/Stable',
70
- 'Intended Audience :: Developers',
71
- 'License :: OSI Approved :: MIT License',
72
- 'Operating System :: Microsoft :: Windows',
73
- 'Programming Language :: Python',
74
- 'Programming Language :: Python :: 3',
75
- 'Topic :: Software Development :: Libraries :: Python Modules',
76
- ]
77
-
78
-
79
- def read_version():
80
- # Determine the version number by reading it from the file
81
- # 'comtypes\__init__.py'. We cannot import this file (with py3,
82
- # at least) because it is in py2.x syntax.
83
- for line in open("comtypes/__init__.py"):
84
- if line.startswith("__version__ = "):
85
- var, value = line.split('=')
86
- return value.strip().strip('"').strip("'")
87
- raise NotImplementedError("__version__ is not found in __init__.py")
88
-
89
-
90
- class post_install(install):
91
-
92
- # both this static variable and method initialize_options() help to avoid
93
- # weird setuptools error with "pip install comtypes", details are here:
94
- # https://github.com/enthought/comtypes/issues/155
95
- # the working solution was found here:
96
- # https://github.com/pypa/setuptools/blob/3b90be7bb6323eb44d0f28864509c1d47aa098de/setuptools/command/install.py
97
- user_options = install.user_options + [
98
- ('old-and-unmanageable', None, "Try not to use this!"),
99
- ('single-version-externally-managed', None,
100
- "used by system package builders to create 'flat' eggs"),
101
- ]
102
-
103
- def initialize_options(self):
104
- install.initialize_options(self)
105
- self.old_and_unmanageable = None
106
- self.single_version_externally_managed = None
107
-
108
- def run(self):
109
- install.run(self)
110
- # Custom script we run at the end of installing
111
- if not self.dry_run and not self.root:
112
- print("Executing post install script...")
113
- print(f'"{sys.executable}" -m comtypes.clear_cache -y')
114
- try:
115
- subprocess.check_call([sys.executable, "-m", "comtypes.clear_cache", '-y'])
116
- except subprocess.CalledProcessError:
117
- print("Failed to run post install script!")
118
-
119
-
120
- setup_params = dict(
121
- name="comtypes",
122
- description="Pure Python COM package",
123
- long_description=readme,
124
- long_description_content_type="text/markdown",
125
- author="Thomas Heller",
126
- author_email="theller@python.net",
127
- url="https://github.com/enthought/comtypes",
128
- download_url="https://github.com/enthought/comtypes/releases",
129
- license="MIT License",
130
- package_data={
131
- "comtypes.test": [
132
- "TestComServer.idl",
133
- "TestComServer.tlb",
134
- "TestDispServer.idl",
135
- "TestDispServer.tlb",
136
- "mytypelib.idl",
137
- "mylib.idl",
138
- "mylib.tlb"
139
- "urlhist.tlb",
140
- "test_jscript.js",
141
- ],
142
- "comtypes": [
143
- "hints.pyi"
144
- ]},
145
- classifiers=classifiers,
146
-
147
- entry_points={
148
- "console_scripts": ["clear_comtypes_cache=comtypes.clear_cache:main"]
149
- },
150
-
151
- cmdclass={
152
- 'test': test,
153
- 'build_py': build_py,
154
- 'install': post_install,
155
- },
156
-
157
- version=read_version(),
158
- packages=[
159
- "comtypes",
160
- "comtypes.client",
161
- "comtypes.server",
162
- "comtypes.tools",
163
- "comtypes.tools.codegenerator",
164
- "comtypes.test",
165
- ],
166
- )
167
-
168
- if __name__ == '__main__':
169
- dist = setup(**setup_params)
170
- # Exit with a failure code if only running the tests and they failed
171
- if dist.commands == ['test']:
172
- command = dist.command_obj['test']
173
- sys.exit(command.failure)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes