aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/windows_support.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-10-19 13:14:06 +0100
committerJason R. Coombs <jaraco@jaraco.com>2014-10-19 13:14:06 +0100
commit1fab75aaec4ada030ca2777e26edbf5eb76d9802 (patch)
tree061e84de49fb71ca4b9c8f37f89f526d723c45cf /setuptools/windows_support.py
parent81b4d929152eb7119f89a06294e2b656d36c3484 (diff)
downloadexternal_python_setuptools-1fab75aaec4ada030ca2777e26edbf5eb76d9802.tar.gz
external_python_setuptools-1fab75aaec4ada030ca2777e26edbf5eb76d9802.tar.bz2
external_python_setuptools-1fab75aaec4ada030ca2777e26edbf5eb76d9802.zip
Defer importing of wintypes because it doesn't import nicely. See Python issue 16396.
Diffstat (limited to 'setuptools/windows_support.py')
-rw-r--r--setuptools/windows_support.py3
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