prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add PYODIDE_MINIMAL build option
  From the added documentation,
  
  > Minimal pyodide build can be enabled by setting the `PYODIDE_MINIMAL`
  environment variable.  For instance,
  > ```            
  > PYODIDE_MINIMAL=true PYODIDE_PACKAGES="micropip" make
  > ```            
  >                
  > This will,
  >  - not include freetype and libpng libraries (it won't be possible to build matplotlib)
  >  - not include the jedi library, disabling auto-completion in iodide
  > 
  > As as a result the size will of the core pyodide binaries will be ~15% smaller.
  
  Addresses two points from https://github.com/iodide-project/pyodide/issues/646
  
  Before (master),
  ```
  6,6M  pyodide.asm.data
  310K  pyodide.asm.data.js
  2,8M  pyodide.asm.js
   11M  pyodide.asm.wasm
   16K  pyodide.js
   16K  pyodide_dev.js
  
  Total: 20.7 MB
  ```
  after (this PR with PYODIDE_MINIMAL=true)
  ```
  5,1M  build/pyodide.asm.data
  124K  build/pyodide.asm.data.js
  2,6M  build/pyodide.asm.js
  9,9M  build/pyodide.asm.wasm
   16K  build/pyodide.js
   16K  build/pyodide_dev.js
  
  Total: 17.7 MB
  ```
  
  so it's not that different (14% less), but it's start. 
  
  Draft PR for now, as I think I need to go in a bit more details through tests that are run in the minimal build CI job.
  
  </issue>
  <code>
  [start of src/pyodide-py/pyodide/console.py]
  1 from typing import List, Optional
  2 
  3 
  4 def get_completions(
  5     code: str, cursor: Optional[int] = None, namespaces: Optional[List] = None
  6 ) -> List[str]:
  7     """
  8     Get code autocompletion candidates
  9 
  10     Note that this function requires to have the jedi module loaded.
  11 
  12     Parameters
  13     ----------
  14     code
  15        the Python code to complete.
  16     cursor
  17        optional position in the code at which to autocomplete
  18     namespaces
  19        a list of namespaces
  20 
  21     Returns
  22     -------
  23     a list of autocompleted modules
  24     """
  25     import jedi
  26     import __main__
  27 
  28     if namespaces is None:
  29         namespaces = [__main__.__dict__]
  30 
  31     if cursor is None:
  32         cursor = len(code)
  33     code = code[:cursor]
  34     interp = jedi.Interpreter(code, namespaces)
  35     completions = interp.completions()
  36 
  37     return [x.name for x in completions]
  38
  [end of src/pyodide-py/pyodide/console.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/src/pyodide-py/pyodide/console.py b/src/pyodide-py/pyodide/console.py
  --- a/src/pyodide-py/pyodide/console.py
  +++ b/src/pyodide-py/pyodide/console.py
  @@ -32,6 +32,6 @@
           cursor = len(code)
       code = code[:cursor]
       interp = jedi.Interpreter(code, namespaces)
  -    completions = interp.completions()
  +    completions = interp.complete()
   
       return [x.name for x in completions]
  
verification_info: {"golden_diff": "diff --git a/src/pyodide-py/pyodide/console.py b/src/pyodide-py/pyodide/console.py\n--- a/src/pyodide-py/pyodide/console.py\n+++ b/src/pyodide-py/pyodide/console.py\n@@ -32,6 +32,6 @@\n         cursor = len(code)\n     code = code[:cursor]\n     interp = jedi.Interpreter(code, namespaces)\n-    completions = interp.completions()\n+    completions = interp.complete()\n \n     return [x.name for x in completions]\n", "issue": "Add PYODIDE_MINIMAL build option\nFrom the added documentation,\r\n\r\n> Minimal pyodide build can be enabled by setting the `PYODIDE_MINIMAL`\r\nenvironment variable.  For instance,\r\n> ```            \r\n> PYODIDE_MINIMAL=true PYODIDE_PACKAGES=\"micropip\" make\r\n> ```            \r\n>                \r\n> This will,\r\n>  - not include freetype and libpng libraries (it won't be possible to build matplotlib)\r\n>  - not include the jedi library, disabling auto-completion in iodide\r\n> \r\n> As as a result the size will of the core pyodide binaries will be ~15% smaller.\r\n\r\nAddresses two points from https://github.com/iodide-project/pyodide/issues/646\r\n\r\nBefore (master),\r\n```\r\n6,6M  pyodide.asm.data\r\n310K  pyodide.asm.data.js\r\n2,8M  pyodide.asm.js\r\n 11M  pyodide.asm.wasm\r\n 16K  pyodide.js\r\n 16K  pyodide_dev.js\r\n\r\nTotal: 20.7 MB\r\n```\r\nafter (this PR with PYODIDE_MINIMAL=true)\r\n```\r\n5,1M  build/pyodide.asm.data\r\n124K  build/pyodide.asm.data.js\r\n2,6M  build/pyodide.asm.js\r\n9,9M  build/pyodide.asm.wasm\r\n 16K  build/pyodide.js\r\n 16K  build/pyodide_dev.js\r\n\r\nTotal: 17.7 MB\r\n```\r\n\r\nso it's not that different (14% less), but it's start. \r\n\r\nDraft PR for now, as I think I need to go in a bit more details through tests that are run in the minimal build CI job.\n", "before_files": [{"content": "from typing import List, Optional\n\n\ndef get_completions(\n    code: str, cursor: Optional[int] = None, namespaces: Optional[List] = None\n) -> List[str]:\n    \"\"\"\n    Get code autocompletion candidates\n\n    Note that this function requires to have the jedi module loaded.\n\n    Parameters\n    ----------\n    code\n       the Python code to complete.\n    cursor\n       optional position in the code at which to autocomplete\n    namespaces\n       a list of namespaces\n\n    Returns\n    -------\n    a list of autocompleted modules\n    \"\"\"\n    import jedi\n    import __main__\n\n    if namespaces is None:\n        namespaces = [__main__.__dict__]\n\n    if cursor is None:\n        cursor = len(code)\n    code = code[:cursor]\n    interp = jedi.Interpreter(code, namespaces)\n    completions = interp.completions()\n\n    return [x.name for x in completions]\n", "path": "src/pyodide-py/pyodide/console.py"}]}