prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  PyInstaller should not check for modules specific for other than the current platform
  **Python extensions for Windows**
  
  We should not be checking for these modules in os x and linux. 
  
  </issue>
  <code>
  [start of PyInstaller/hooks/pre_safe_import_module/hook-win32com.py]
  1 #-----------------------------------------------------------------------------
  2 # Copyright (c) 2005-2017, PyInstaller Development Team.
  3 #
  4 # Distributed under the terms of the GNU General Public License with exception
  5 # for distributing bootloader.
  6 #
  7 # The full license is in the file COPYING.txt, distributed with this software.
  8 #-----------------------------------------------------------------------------
  9 
  10 """
  11 PyWin32 package 'win32com' extends it's __path__ attribute with win32comext
  12 directory and thus PyInstaller is not able to find modules in it. For example
  13 module 'win32com.shell' is in reality 'win32comext.shell'.
  14 
  15 >>> win32com.__path__
  16 ['win32com', 'C:\\Python27\\Lib\\site-packages\\win32comext']
  17 
  18 """
  19 
  20 
  21 import os
  22 
  23 from PyInstaller.utils.hooks import logger, get_module_file_attribute
  24 
  25 
  26 def pre_safe_import_module(api):
  27     win32com_dir = os.path.dirname(get_module_file_attribute('win32com'))
  28     comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext')
  29     logger.debug('win32com: extending __path__ with dir %r' % comext_dir)
  30     # Append the __path__ where PyInstaller will look for 'win32com' modules.'
  31     api.append_package_path(comext_dir)
  32
  [end of PyInstaller/hooks/pre_safe_import_module/hook-win32com.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py b/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py
  --- a/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py
  +++ b/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py
  @@ -21,11 +21,13 @@
   import os
   
   from PyInstaller.utils.hooks import logger, get_module_file_attribute
  +from PyInstaller.compat import is_win
   
   
   def pre_safe_import_module(api):
  -    win32com_dir = os.path.dirname(get_module_file_attribute('win32com'))
  -    comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext')
  -    logger.debug('win32com: extending __path__ with dir %r' % comext_dir)
  -    # Append the __path__ where PyInstaller will look for 'win32com' modules.'
  -    api.append_package_path(comext_dir)
  +    if is_win:
  +        win32com_dir = os.path.dirname(get_module_file_attribute('win32com'))
  +        comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext')
  +        logger.debug('win32com: extending __path__ with dir %r' % comext_dir)
  +        # Append the __path__ where PyInstaller will look for 'win32com' modules.'
  +        api.append_package_path(comext_dir)
  
verification_info: {"golden_diff": "diff --git a/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py b/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py\n--- a/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py\n+++ b/PyInstaller/hooks/pre_safe_import_module/hook-win32com.py\n@@ -21,11 +21,13 @@\n import os\n \n from PyInstaller.utils.hooks import logger, get_module_file_attribute\n+from PyInstaller.compat import is_win\n \n \n def pre_safe_import_module(api):\n-    win32com_dir = os.path.dirname(get_module_file_attribute('win32com'))\n-    comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext')\n-    logger.debug('win32com: extending __path__ with dir %r' % comext_dir)\n-    # Append the __path__ where PyInstaller will look for 'win32com' modules.'\n-    api.append_package_path(comext_dir)\n+    if is_win:\n+        win32com_dir = os.path.dirname(get_module_file_attribute('win32com'))\n+        comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext')\n+        logger.debug('win32com: extending __path__ with dir %r' % comext_dir)\n+        # Append the __path__ where PyInstaller will look for 'win32com' modules.'\n+        api.append_package_path(comext_dir)\n", "issue": "PyInstaller should not check for modules specific for other than the current platform\n**Python extensions for Windows**\r\n\r\nWe should not be checking for these modules in os x and linux. \n", "before_files": [{"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2017, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n#-----------------------------------------------------------------------------\n\n\"\"\"\nPyWin32 package 'win32com' extends it's __path__ attribute with win32comext\ndirectory and thus PyInstaller is not able to find modules in it. For example\nmodule 'win32com.shell' is in reality 'win32comext.shell'.\n\n>>> win32com.__path__\n['win32com', 'C:\\\\Python27\\\\Lib\\\\site-packages\\\\win32comext']\n\n\"\"\"\n\n\nimport os\n\nfrom PyInstaller.utils.hooks import logger, get_module_file_attribute\n\n\ndef pre_safe_import_module(api):\n    win32com_dir = os.path.dirname(get_module_file_attribute('win32com'))\n    comext_dir = os.path.join(os.path.dirname(win32com_dir), 'win32comext')\n    logger.debug('win32com: extending __path__ with dir %r' % comext_dir)\n    # Append the __path__ where PyInstaller will look for 'win32com' modules.'\n    api.append_package_path(comext_dir)\n", "path": "PyInstaller/hooks/pre_safe_import_module/hook-win32com.py"}]}