1
1
"""comtypes package install script"""
2
2
import sys
3
3
import os
4
- import ctypes
5
4
import subprocess
6
5
7
6
from distutils .core import Command
13
12
with open ('README.md' ) as readme_stream :
14
13
readme = readme_stream .read ()
15
14
15
+
16
16
class test (Command ):
17
17
# Original version of this class posted
18
18
# by Berthold Hoellmann to [email protected]
@@ -24,7 +24,8 @@ class test(Command):
24
24
('use-resources=' , 'u' ,
25
25
"resources to use - resource names are defined by tests" ),
26
26
('refcounts' , 'r' ,
27
- "repeat tests to search for refcount leaks (requires 'sys.gettotalrefcount')" ),
27
+ "repeat tests to search for refcount leaks (requires "
28
+ "'sys.gettotalrefcount')" ),
28
29
]
29
30
30
31
boolean_options = ["refcounts" ]
@@ -64,6 +65,7 @@ def run(self):
64
65
self .refcounts )
65
66
self .failure = self .failure or package_failure
66
67
68
+
67
69
classifiers = [
68
70
'Development Status :: 5 - Production/Stable' ,
69
71
'Intended Audience :: Developers' ,
@@ -75,6 +77,7 @@ def run(self):
75
77
'Topic :: Software Development :: Libraries :: Python Modules' ,
76
78
]
77
79
80
+
78
81
def read_version ():
79
82
# Determine the version number by reading it from the file
80
83
# 'comtypes\__init__.py'. We cannot import this file (with py3,
@@ -108,7 +111,8 @@ def run(self):
108
111
install .run (self )
109
112
# Custom script we run at the end of installing
110
113
if not self .dry_run and not self .root :
111
- filename = os .path .join (self .install_scripts , "clear_comtypes_cache.py" )
114
+ filename = os .path .join (
115
+ self .install_scripts , "clear_comtypes_cache.py" )
112
116
if not os .path .isfile (filename ):
113
117
raise RuntimeError ("Can't find '%s'" % (filename ,))
114
118
print ("Executing post install script..." )
@@ -122,7 +126,7 @@ def run(self):
122
126
setup_params = dict (
123
127
name = "comtypes" ,
124
128
description = "Pure Python COM package" ,
125
- long_description = readme ,
129
+ long_description = readme ,
126
130
author = "Thomas Heller" ,
127
131
128
132
url = "https://github.com/enthought/comtypes" ,
0 commit comments