diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-10-19 13:07:48 +0100 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-10-19 13:07:48 +0100 |
commit | 7c8f54078307008e9ac804c392059694e36df781 (patch) | |
tree | 66a17780f8a71445ec198735b9f1561be1f2b001 | |
parent | 39a920265a6754fb438aa358b58aed91c1a0adb9 (diff) | |
download | python-setuptools-bitbucket-7c8f54078307008e9ac804c392059694e36df781.tar.gz |
Decorate hide_file to only run on Windows.
-rw-r--r-- | setuptools/windows_support.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/setuptools/windows_support.py b/setuptools/windows_support.py index df35a5f4..8e67e41a 100644 --- a/setuptools/windows_support.py +++ b/setuptools/windows_support.py @@ -1,6 +1,14 @@ +import platform import ctypes.wintypes +def windows_only(func): + if platform.system() != 'Windows': + return lambda *args, **kwargs: None + return func + + +@windows_only def hide_file(path): """ Set the hidden attribute on a file or directory. |