diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-10-19 13:14:06 +0100 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-10-19 13:14:06 +0100 |
commit | c02f1deb9ac52b8b7b70837944485251c1b83d68 (patch) | |
tree | d61fda386ee4ad7a8871e2f0ae5f397f5346b034 | |
parent | 7c8f54078307008e9ac804c392059694e36df781 (diff) | |
download | python-setuptools-bitbucket-c02f1deb9ac52b8b7b70837944485251c1b83d68.tar.gz |
Defer importing of wintypes because it doesn't import nicely. See Python issue 16396.
-rw-r--r-- | setuptools/windows_support.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py index 8e67e41a..cb977cff 100644 --- a/setuptools/windows_support.py +++ b/setuptools/windows_support.py @@ -1,5 +1,5 @@ import platform -import ctypes.wintypes +import ctypes def windows_only(func): @@ -17,6 +17,7 @@ def hide_file(path): `path` must be text. """ + __import__('ctypes.wintypes') SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD SetFileAttributes.restype = ctypes.wintypes.BOOL |