prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Unhandled python exception with 0.62 on windows (0.61 ok)
  **Describe the bug**
  When running meson 0.62 on win32 and a project using `dependency()` (ex glib):
  
  Unhandled python exception
  ModuleNotFoundError: No module named 'mesonbuild.dependencies.data'
  
  ```
  Traceback (most recent call last):
    File "mesonbuild\mesonmain.py", line 151, in run
    File "mesonbuild\msetup.py", line 301, in run
    File "mesonbuild\msetup.py", line 185, in generate
    File "mesonbuild\msetup.py", line 229, in _generate
    File "mesonbuild\interpreter\interpreter.py", line 2698, in run
    File "mesonbuild\interpreterbase\interpreterbase.py", line 149, in run
    File "mesonbuild\interpreterbase\interpreterbase.py", line 174, in evaluate_codeblock
    File "mesonbuild\interpreterbase\interpreterbase.py", line 167, in evaluate_codeblock
    File "mesonbuild\interpreterbase\interpreterbase.py", line 182, in evaluate_statement
    File "mesonbuild\interpreterbase\interpreterbase.py", line 567, in assignment
    File "mesonbuild\interpreterbase\interpreterbase.py", line 180, in evaluate_statement
    File "mesonbuild\interpreterbase\interpreterbase.py", line 455, in function_call
    File "mesonbuild\interpreterbase\decorators.py", line 768, in wrapped
    File "mesonbuild\interpreterbase\decorators.py", line 768, in wrapped
    File "mesonbuild\interpreterbase\decorators.py", line 768, in wrapped
    [Previous line repeated 5 more times]
    File "mesonbuild\interpreterbase\decorators.py", line 109, in wrapped
    File "mesonbuild\interpreterbase\decorators.py", line 127, in wrapped
    File "mesonbuild\interpreterbase\decorators.py", line 277, in wrapper
    File "mesonbuild\interpreter\interpreter.py", line 1620, in func_dependency
    File "mesonbuild\interpreter\dependencyfallbacks.py", line 352, in lookup
    File "mesonbuild\interpreter\dependencyfallbacks.py", line 93, in _do_dependency
    File "mesonbuild\dependencies\detect.py", line 112, in find_external_dependency
    File "mesonbuild\dependencies\cmake.py", line 135, in __init__
    File "mesonbuild\dependencies\cmake.py", line 183, in _get_cmake_info
    File "mesonbuild\dependencies\cmake.py", line 614, in _call_cmake
    File "mesonbuild\dependencies\cmake.py", line 585, in _setup_cmake_dir
    File "importlib\resources.py", line 103, in read_text
    File "importlib\resources.py", line 82, in open_text
    File "importlib\resources.py", line 43, in open_binary
    File "importlib\_common.py", line 66, in get_package
    File "importlib\_common.py", line 57, in resolve
    File "importlib\__init__.py", line 126, in import_module
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'mesonbuild.dependencies.data'
  ```
  
  **To Reproduce**
  project('foo')
  pcre = dependency('libpcre')
  
  **system parameters**
  meson 0.62 (MSI) on windev VM (https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/)
  works as expected on 0.61
  
  </issue>
  <code>
  [start of packaging/hook-mesonbuild.py]
  1 #!hint/python3
  2 
  3 """
  4 PyInstaller hook to make mesonbuild include everything it needs to.
  5 """
  6 
  7 import os
  8 from glob import glob
  9 
  10 hiddenimports = []
  11 
  12 def get_all_modules_from_dir(dirname):
  13     '''
  14     Get all modules required for Meson itself from directories.
  15     '''
  16     modname = os.path.basename(dirname)
  17     modules = [os.path.splitext(os.path.split(x)[1])[0] for x in glob(os.path.join(dirname, '*'))]
  18     modules = ['mesonbuild.' + modname + '.' + x for x in modules if not x.startswith('_')]
  19     return modules
  20 
  21 hiddenimports += get_all_modules_from_dir('mesonbuild/modules')
  22 hiddenimports += get_all_modules_from_dir('mesonbuild/scripts')
  23 
  24 # Python packagers want to be minimal and only copy the things
  25 # that they can see being used. They are blind to many things.
  26 hiddenimports += [
  27     # we run distutils as a subprocess via INTROSPECT_COMMAND.
  28     'distutils.archive_util',
  29     'distutils.cmd',
  30     'distutils.config',
  31     'distutils.core',
  32     'distutils.debug',
  33     'distutils.dep_util',
  34     'distutils.dir_util',
  35     'distutils.dist',
  36     'distutils.errors',
  37     'distutils.extension',
  38     'distutils.fancy_getopt',
  39     'distutils.file_util',
  40     'distutils.spawn',
  41     'distutils.util',
  42     'distutils.version',
  43     'distutils.command.build_ext',
  44     'distutils.command.build',
  45     'distutils.command.install',
  46 
  47     # needed for gtk's find_program() scripts
  48     'filecmp',
  49 ]
  50
  [end of packaging/hook-mesonbuild.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/packaging/hook-mesonbuild.py b/packaging/hook-mesonbuild.py
  --- a/packaging/hook-mesonbuild.py
  +++ b/packaging/hook-mesonbuild.py
  @@ -7,6 +7,9 @@
   import os
   from glob import glob
   
  +from PyInstaller.utils.hooks import collect_data_files
  +
  +datas = []
   hiddenimports = []
   
   def get_all_modules_from_dir(dirname):
  @@ -18,6 +21,10 @@
       modules = ['mesonbuild.' + modname + '.' + x for x in modules if not x.startswith('_')]
       return modules
   
  +datas += collect_data_files('mesonbuild.scripts')
  +datas += collect_data_files('mesonbuild.cmake.data')
  +datas += collect_data_files('mesonbuild.dependencies.data')
  +
   hiddenimports += get_all_modules_from_dir('mesonbuild/modules')
   hiddenimports += get_all_modules_from_dir('mesonbuild/scripts')
  
verification_info: {"golden_diff": "diff --git a/packaging/hook-mesonbuild.py b/packaging/hook-mesonbuild.py\n--- a/packaging/hook-mesonbuild.py\n+++ b/packaging/hook-mesonbuild.py\n@@ -7,6 +7,9 @@\n import os\n from glob import glob\n \n+from PyInstaller.utils.hooks import collect_data_files\n+\n+datas = []\n hiddenimports = []\n \n def get_all_modules_from_dir(dirname):\n@@ -18,6 +21,10 @@\n     modules = ['mesonbuild.' + modname + '.' + x for x in modules if not x.startswith('_')]\n     return modules\n \n+datas += collect_data_files('mesonbuild.scripts')\n+datas += collect_data_files('mesonbuild.cmake.data')\n+datas += collect_data_files('mesonbuild.dependencies.data')\n+\n hiddenimports += get_all_modules_from_dir('mesonbuild/modules')\n hiddenimports += get_all_modules_from_dir('mesonbuild/scripts')\n", "issue": "Unhandled python exception with 0.62 on windows (0.61 ok)\n**Describe the bug**\r\nWhen running meson 0.62 on win32 and a project using `dependency()` (ex glib):\r\n\r\nUnhandled python exception\r\nModuleNotFoundError: No module named 'mesonbuild.dependencies.data'\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"mesonbuild\\mesonmain.py\", line 151, in run\r\n  File \"mesonbuild\\msetup.py\", line 301, in run\r\n  File \"mesonbuild\\msetup.py\", line 185, in generate\r\n  File \"mesonbuild\\msetup.py\", line 229, in _generate\r\n  File \"mesonbuild\\interpreter\\interpreter.py\", line 2698, in run\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 149, in run\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 174, in evaluate_codeblock\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 167, in evaluate_codeblock\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 182, in evaluate_statement\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 567, in assignment\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 180, in evaluate_statement\r\n  File \"mesonbuild\\interpreterbase\\interpreterbase.py\", line 455, in function_call\r\n  File \"mesonbuild\\interpreterbase\\decorators.py\", line 768, in wrapped\r\n  File \"mesonbuild\\interpreterbase\\decorators.py\", line 768, in wrapped\r\n  File \"mesonbuild\\interpreterbase\\decorators.py\", line 768, in wrapped\r\n  [Previous line repeated 5 more times]\r\n  File \"mesonbuild\\interpreterbase\\decorators.py\", line 109, in wrapped\r\n  File \"mesonbuild\\interpreterbase\\decorators.py\", line 127, in wrapped\r\n  File \"mesonbuild\\interpreterbase\\decorators.py\", line 277, in wrapper\r\n  File \"mesonbuild\\interpreter\\interpreter.py\", line 1620, in func_dependency\r\n  File \"mesonbuild\\interpreter\\dependencyfallbacks.py\", line 352, in lookup\r\n  File \"mesonbuild\\interpreter\\dependencyfallbacks.py\", line 93, in _do_dependency\r\n  File \"mesonbuild\\dependencies\\detect.py\", line 112, in find_external_dependency\r\n  File \"mesonbuild\\dependencies\\cmake.py\", line 135, in __init__\r\n  File \"mesonbuild\\dependencies\\cmake.py\", line 183, in _get_cmake_info\r\n  File \"mesonbuild\\dependencies\\cmake.py\", line 614, in _call_cmake\r\n  File \"mesonbuild\\dependencies\\cmake.py\", line 585, in _setup_cmake_dir\r\n  File \"importlib\\resources.py\", line 103, in read_text\r\n  File \"importlib\\resources.py\", line 82, in open_text\r\n  File \"importlib\\resources.py\", line 43, in open_binary\r\n  File \"importlib\\_common.py\", line 66, in get_package\r\n  File \"importlib\\_common.py\", line 57, in resolve\r\n  File \"importlib\\__init__.py\", line 126, in import_module\r\n  File \"<frozen importlib._bootstrap>\", line 1050, in _gcd_import\r\n  File \"<frozen importlib._bootstrap>\", line 1027, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 1004, in _find_and_load_unlocked\r\nModuleNotFoundError: No module named 'mesonbuild.dependencies.data'\r\n```\r\n\r\n**To Reproduce**\r\nproject('foo')\r\npcre = dependency('libpcre')\r\n\r\n**system parameters**\r\nmeson 0.62 (MSI) on windev VM (https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/)\r\nworks as expected on 0.61\n", "before_files": [{"content": "#!hint/python3\n\n\"\"\"\nPyInstaller hook to make mesonbuild include everything it needs to.\n\"\"\"\n\nimport os\nfrom glob import glob\n\nhiddenimports = []\n\ndef get_all_modules_from_dir(dirname):\n    '''\n    Get all modules required for Meson itself from directories.\n    '''\n    modname = os.path.basename(dirname)\n    modules = [os.path.splitext(os.path.split(x)[1])[0] for x in glob(os.path.join(dirname, '*'))]\n    modules = ['mesonbuild.' + modname + '.' + x for x in modules if not x.startswith('_')]\n    return modules\n\nhiddenimports += get_all_modules_from_dir('mesonbuild/modules')\nhiddenimports += get_all_modules_from_dir('mesonbuild/scripts')\n\n# Python packagers want to be minimal and only copy the things\n# that they can see being used. They are blind to many things.\nhiddenimports += [\n    # we run distutils as a subprocess via INTROSPECT_COMMAND.\n    'distutils.archive_util',\n    'distutils.cmd',\n    'distutils.config',\n    'distutils.core',\n    'distutils.debug',\n    'distutils.dep_util',\n    'distutils.dir_util',\n    'distutils.dist',\n    'distutils.errors',\n    'distutils.extension',\n    'distutils.fancy_getopt',\n    'distutils.file_util',\n    'distutils.spawn',\n    'distutils.util',\n    'distutils.version',\n    'distutils.command.build_ext',\n    'distutils.command.build',\n    'distutils.command.install',\n\n    # needed for gtk's find_program() scripts\n    'filecmp',\n]\n", "path": "packaging/hook-mesonbuild.py"}]}