From 81b4d929152eb7119f89a06294e2b656d36c3484 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Oct 2014 13:07:48 +0100 Subject: Decorate hide_file to only run on Windows. --- setuptools/windows_support.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'setuptools/windows_support.py') 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. -- cgit v1.2.3