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 | 81b4d929152eb7119f89a06294e2b656d36c3484 (patch) | |
| tree | a04cecfe6aba92b554fd7de0693c880807533808 /setuptools | |
| parent | ae6eb3131a935824d1aca43c6ac5ac6bb4907078 (diff) | |
| download | python-setuptools-git-81b4d929152eb7119f89a06294e2b656d36c3484.tar.gz | |
Decorate hide_file to only run on Windows.
Diffstat (limited to 'setuptools')
| -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. |
