prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Pin pyjnius version
  This pull request adds a version pin for pyjnius as requested here: #1415 
  
  Please note I am proposing this as a **permanent measure** because this is such a core component - not this specific version of course, but that it is always pinned.
  
  Even if you just randomly bump the version up in any random commit without checking, this is a huge improvement: it will prevent p4a master builds from randomly failing out of the blue *when not even changing the commit*, and people will be able to go back to an earlier p4a master commit to avoid sudden pyjnius breakages instead of patching around in the recipes folder (which depending on the build pipeline might be quite a time waster to do, especially compared to just going back to a known working p4a master commit).
  
  Summed up, please pin this, carelessly bump it whenever, and have less unhappy users. :smile:
  
  (And I'm not proposing pinning *everything*, I know you have way too many recipes and people would forget to bump it, I understand - but at least the core components like pyjnius, would that possibly sound feasible?)
  
  </issue>
  <code>
  [start of pythonforandroid/recipes/pyjnius/__init__.py]
  1 from pythonforandroid.recipe import CythonRecipe
  2 from pythonforandroid.toolchain import shprint, current_directory, info
  3 from pythonforandroid.patching import will_build
  4 import sh
  5 from os.path import join
  6 
  7 
  8 class PyjniusRecipe(CythonRecipe):
  9     version = 'master'
  10     url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'
  11     name = 'pyjnius'
  12     depends = [('python2', 'python3crystax'), ('genericndkbuild', 'sdl2', 'sdl'), 'six']
  13     site_packages_name = 'jnius'
  14 
  15     patches = [('sdl2_jnienv_getter.patch', will_build('sdl2')),
  16                ('genericndkbuild_jnienv_getter.patch', will_build('genericndkbuild'))]
  17 
  18     def postbuild_arch(self, arch):
  19         super(PyjniusRecipe, self).postbuild_arch(arch)
  20         info('Copying pyjnius java class to classes build dir')
  21         with current_directory(self.get_build_dir(arch.arch)):
  22             shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir)
  23 
  24 
  25 recipe = PyjniusRecipe()
  26
  [end of pythonforandroid/recipes/pyjnius/__init__.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/pythonforandroid/recipes/pyjnius/__init__.py b/pythonforandroid/recipes/pyjnius/__init__.py
  --- a/pythonforandroid/recipes/pyjnius/__init__.py
  +++ b/pythonforandroid/recipes/pyjnius/__init__.py
  @@ -6,7 +6,7 @@
   
   
   class PyjniusRecipe(CythonRecipe):
  -    version = 'master'
  +    version = '1.1.3'
       url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'
       name = 'pyjnius'
       depends = [('python2', 'python3crystax'), ('genericndkbuild', 'sdl2', 'sdl'), 'six']
  
verification_info: {"golden_diff": "diff --git a/pythonforandroid/recipes/pyjnius/__init__.py b/pythonforandroid/recipes/pyjnius/__init__.py\n--- a/pythonforandroid/recipes/pyjnius/__init__.py\n+++ b/pythonforandroid/recipes/pyjnius/__init__.py\n@@ -6,7 +6,7 @@\n \n \n class PyjniusRecipe(CythonRecipe):\n-    version = 'master'\n+    version = '1.1.3'\n     url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'\n     name = 'pyjnius'\n     depends = [('python2', 'python3crystax'), ('genericndkbuild', 'sdl2', 'sdl'), 'six']\n", "issue": "Pin pyjnius version\nThis pull request adds a version pin for pyjnius as requested here: #1415 \r\n\r\nPlease note I am proposing this as a **permanent measure** because this is such a core component - not this specific version of course, but that it is always pinned.\r\n\r\nEven if you just randomly bump the version up in any random commit without checking, this is a huge improvement: it will prevent p4a master builds from randomly failing out of the blue *when not even changing the commit*, and people will be able to go back to an earlier p4a master commit to avoid sudden pyjnius breakages instead of patching around in the recipes folder (which depending on the build pipeline might be quite a time waster to do, especially compared to just going back to a known working p4a master commit).\r\n\r\nSummed up, please pin this, carelessly bump it whenever, and have less unhappy users. :smile:\r\n\r\n(And I'm not proposing pinning *everything*, I know you have way too many recipes and people would forget to bump it, I understand - but at least the core components like pyjnius, would that possibly sound feasible?)\n", "before_files": [{"content": "from pythonforandroid.recipe import CythonRecipe\nfrom pythonforandroid.toolchain import shprint, current_directory, info\nfrom pythonforandroid.patching import will_build\nimport sh\nfrom os.path import join\n\n\nclass PyjniusRecipe(CythonRecipe):\n    version = 'master'\n    url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'\n    name = 'pyjnius'\n    depends = [('python2', 'python3crystax'), ('genericndkbuild', 'sdl2', 'sdl'), 'six']\n    site_packages_name = 'jnius'\n\n    patches = [('sdl2_jnienv_getter.patch', will_build('sdl2')),\n               ('genericndkbuild_jnienv_getter.patch', will_build('genericndkbuild'))]\n\n    def postbuild_arch(self, arch):\n        super(PyjniusRecipe, self).postbuild_arch(arch)\n        info('Copying pyjnius java class to classes build dir')\n        with current_directory(self.get_build_dir(arch.arch)):\n            shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir)\n\n\nrecipe = PyjniusRecipe()\n", "path": "pythonforandroid/recipes/pyjnius/__init__.py"}]}