prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Typo?
  Wondering what "wv" means or if this should read "more complex things."
  
  https://github.com/iodide-project/pyodide/blob/163ab43b64180223d010cdcdcdecd17307cc5a45/pyodide_build/mkpkg.py#L77-L79
  
  </issue>
  <code>
  [start of pyodide_build/mkpkg.py]
  1 #!/usr/bin/env python3
  2 
  3 import argparse
  4 import json
  5 import os
  6 import shutil
  7 import urllib.request
  8 from pathlib import Path
  9 
  10 PACKAGES_ROOT = Path(__file__).parent.parent / 'packages'
  11 
  12 SDIST_EXTENSIONS = []
  13 
  14 
  15 def get_sdist_extensions():
  16     if SDIST_EXTENSIONS:
  17         return SDIST_EXTENSIONS
  18 
  19     for format in shutil.get_unpack_formats():
  20         for ext in format[1]:
  21             SDIST_EXTENSIONS.append(ext)
  22 
  23     return SDIST_EXTENSIONS
  24 
  25 
  26 def get_sdist_url_entry(json_content):
  27     sdist_extensions_tuple = tuple(get_sdist_extensions())
  28 
  29     for entry in json_content['urls']:
  30         if entry['filename'].endswith(sdist_extensions_tuple):
  31             return entry
  32 
  33     raise Exception('No sdist URL found for package %s (%s)' % (
  34         json_content['info'].get('name'),
  35         json_content['info'].get('package_url'),
  36     ))
  37 
  38 
  39 def make_package(package, version=None):
  40     import yaml
  41 
  42     version = ('/' + version) if version is not None else ''
  43     url = f"https://pypi.org/pypi/{package}{version}/json"
  44 
  45     with urllib.request.urlopen(url) as fd:
  46         json_content = json.load(fd)
  47 
  48     entry = get_sdist_url_entry(json_content)
  49     download_url = entry['url']
  50     sha256 = entry['digests']['sha256']
  51     version = json_content['info']['version']
  52 
  53     yaml_content = {
  54         'package': {
  55             'name': package,
  56             'version': version
  57         },
  58         'source': {
  59             'url': download_url,
  60             'sha256': sha256
  61         },
  62         'test': {
  63             'imports': [
  64                 package
  65             ]
  66         }
  67     }
  68 
  69     if not (PACKAGES_ROOT / package).is_dir():
  70         os.makedirs(PACKAGES_ROOT / package)
  71     with open(PACKAGES_ROOT / package / 'meta.yaml', 'w') as fd:
  72         yaml.dump(yaml_content, fd, default_flow_style=False)
  73 
  74 
  75 def make_parser(parser):
  76     parser.description = '''
  77 Make a new pyodide package. Creates a simple template that will work
  78 for most pure Python packages, but will have to be edited for more wv
  79 complex things.'''.strip()
  80     parser.add_argument(
  81         'package', type=str, nargs=1,
  82         help="The package name on PyPI")
  83     parser.add_argument(
  84         '--version', type=str, default=None,
  85         help="Package version string, "
  86              "e.g. v1.2.1 (defaults to latest stable release)")
  87     return parser
  88 
  89 
  90 def main(args):
  91     package = args.package[0]
  92     make_package(package, args.version)
  93 
  94 
  95 if __name__ == '__main__':
  96     parser = make_parser(argparse.ArgumentParser())
  97     args = parser.parse_args()
  98     main(args)
  99
  [end of pyodide_build/mkpkg.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/pyodide_build/mkpkg.py b/pyodide_build/mkpkg.py
  --- a/pyodide_build/mkpkg.py
  +++ b/pyodide_build/mkpkg.py
  @@ -75,7 +75,7 @@
   def make_parser(parser):
       parser.description = '''
   Make a new pyodide package. Creates a simple template that will work
  -for most pure Python packages, but will have to be edited for more wv
  +for most pure Python packages, but will have to be edited for more
   complex things.'''.strip()
       parser.add_argument(
           'package', type=str, nargs=1,
  
verification_info: {"golden_diff": "diff --git a/pyodide_build/mkpkg.py b/pyodide_build/mkpkg.py\n--- a/pyodide_build/mkpkg.py\n+++ b/pyodide_build/mkpkg.py\n@@ -75,7 +75,7 @@\n def make_parser(parser):\n     parser.description = '''\n Make a new pyodide package. Creates a simple template that will work\n-for most pure Python packages, but will have to be edited for more wv\n+for most pure Python packages, but will have to be edited for more\n complex things.'''.strip()\n     parser.add_argument(\n         'package', type=str, nargs=1,\n", "issue": "Typo?\nWondering what \"wv\" means or if this should read \"more complex things.\"\r\n\r\nhttps://github.com/iodide-project/pyodide/blob/163ab43b64180223d010cdcdcdecd17307cc5a45/pyodide_build/mkpkg.py#L77-L79\n", "before_files": [{"content": "#!/usr/bin/env python3\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport urllib.request\nfrom pathlib import Path\n\nPACKAGES_ROOT = Path(__file__).parent.parent / 'packages'\n\nSDIST_EXTENSIONS = []\n\n\ndef get_sdist_extensions():\n    if SDIST_EXTENSIONS:\n        return SDIST_EXTENSIONS\n\n    for format in shutil.get_unpack_formats():\n        for ext in format[1]:\n            SDIST_EXTENSIONS.append(ext)\n\n    return SDIST_EXTENSIONS\n\n\ndef get_sdist_url_entry(json_content):\n    sdist_extensions_tuple = tuple(get_sdist_extensions())\n\n    for entry in json_content['urls']:\n        if entry['filename'].endswith(sdist_extensions_tuple):\n            return entry\n\n    raise Exception('No sdist URL found for package %s (%s)' % (\n        json_content['info'].get('name'),\n        json_content['info'].get('package_url'),\n    ))\n\n\ndef make_package(package, version=None):\n    import yaml\n\n    version = ('/' + version) if version is not None else ''\n    url = f\"https://pypi.org/pypi/{package}{version}/json\"\n\n    with urllib.request.urlopen(url) as fd:\n        json_content = json.load(fd)\n\n    entry = get_sdist_url_entry(json_content)\n    download_url = entry['url']\n    sha256 = entry['digests']['sha256']\n    version = json_content['info']['version']\n\n    yaml_content = {\n        'package': {\n            'name': package,\n            'version': version\n        },\n        'source': {\n            'url': download_url,\n            'sha256': sha256\n        },\n        'test': {\n            'imports': [\n                package\n            ]\n        }\n    }\n\n    if not (PACKAGES_ROOT / package).is_dir():\n        os.makedirs(PACKAGES_ROOT / package)\n    with open(PACKAGES_ROOT / package / 'meta.yaml', 'w') as fd:\n        yaml.dump(yaml_content, fd, default_flow_style=False)\n\n\ndef make_parser(parser):\n    parser.description = '''\nMake a new pyodide package. Creates a simple template that will work\nfor most pure Python packages, but will have to be edited for more wv\ncomplex things.'''.strip()\n    parser.add_argument(\n        'package', type=str, nargs=1,\n        help=\"The package name on PyPI\")\n    parser.add_argument(\n        '--version', type=str, default=None,\n        help=\"Package version string, \"\n             \"e.g. v1.2.1 (defaults to latest stable release)\")\n    return parser\n\n\ndef main(args):\n    package = args.package[0]\n    make_package(package, args.version)\n\n\nif __name__ == '__main__':\n    parser = make_parser(argparse.ArgumentParser())\n    args = parser.parse_args()\n    main(args)\n", "path": "pyodide_build/mkpkg.py"}]}