prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  2.2.0 CLI reports version 2.1.2dev0 
  * Cookiecutter version: 2.2.0 (or 2.1.2dev0, depending on who you ask)
  * Template project url: n/a
  * Python version: 3.11
  * Operating System: linux
  
  ### Description:
  
  Get the accurate version of cookiecutter from the CLI
  
  ### What I've run:
  
  ```bash
  cookiecutter --version
  Cookiecutter 2.1.2.dev0 from $PREFIX/lib/python3.11/site-packages (Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:17) [GCC 12.2.0])
  ```
  
  Would be a one-line fix, but ideally would be always be sourced from exactly one place:
  - `setup.py` and `importlib_metadata`
  - `__init__.py`
  - a `VERSION` file
  
  </issue>
  <code>
  [start of cookiecutter/__init__.py]
  1 """Main package for Cookiecutter."""
  2 __version__ = "2.1.2.dev0"
  3
  [end of cookiecutter/__init__.py]
  [start of setup.py]
  1 """cookiecutter distutils configuration."""
  2 from setuptools import setup
  3 
  4 version = "2.2.3.dev0"
  5 
  6 with open('README.md', encoding='utf-8') as readme_file:
  7     readme = readme_file.read()
  8 
  9 requirements = [
  10     'binaryornot>=0.4.4',
  11     'Jinja2>=2.7,<4.0.0',
  12     'click>=7.0,<9.0.0',
  13     'pyyaml>=5.3.1',
  14     'python-slugify>=4.0.0',
  15     'requests>=2.23.0',
  16     'arrow',
  17 ]
  18 
  19 setup(
  20     name='cookiecutter',
  21     version=version,
  22     description=(
  23         'A command-line utility that creates projects from project '
  24         'templates, e.g. creating a Python package project from a '
  25         'Python package project template.'
  26     ),
  27     long_description=readme,
  28     long_description_content_type='text/markdown',
  29     author='Audrey Feldroy',
  30     author_email='audreyr@gmail.com',
  31     url='https://github.com/cookiecutter/cookiecutter',
  32     project_urls={
  33         "Documentation": "https://cookiecutter.readthedocs.io",
  34         "Issues": "https://github.com/cookiecutter/cookiecutter/issues",
  35         "Discord": "https://discord.gg/9BrxzPKuEW",
  36     },
  37     packages=['cookiecutter'],
  38     package_dir={'cookiecutter': 'cookiecutter'},
  39     entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},
  40     include_package_data=True,
  41     python_requires='>=3.7',
  42     install_requires=requirements,
  43     license='BSD',
  44     zip_safe=False,
  45     classifiers=[
  46         "Development Status :: 5 - Production/Stable",
  47         "Environment :: Console",
  48         "Intended Audience :: Developers",
  49         "Natural Language :: English",
  50         "License :: OSI Approved :: BSD License",
  51         "Programming Language :: Python :: 3 :: Only",
  52         "Programming Language :: Python :: 3",
  53         "Programming Language :: Python :: 3.7",
  54         "Programming Language :: Python :: 3.8",
  55         "Programming Language :: Python :: 3.9",
  56         "Programming Language :: Python :: 3.10",
  57         "Programming Language :: Python :: 3.11",
  58         "Programming Language :: Python :: Implementation :: CPython",
  59         "Programming Language :: Python :: Implementation :: PyPy",
  60         "Programming Language :: Python",
  61         "Topic :: Software Development",
  62     ],
  63     keywords=[
  64         "cookiecutter",
  65         "Python",
  66         "projects",
  67         "project templates",
  68         "Jinja2",
  69         "skeleton",
  70         "scaffolding",
  71         "project directory",
  72         "package",
  73         "packaging",
  74     ],
  75 )
  76
  [end of setup.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/cookiecutter/__init__.py b/cookiecutter/__init__.py
  --- a/cookiecutter/__init__.py
  +++ b/cookiecutter/__init__.py
  @@ -1,2 +1,12 @@
   """Main package for Cookiecutter."""
  -__version__ = "2.1.2.dev0"
  +from pathlib import Path
  +
  +
  +def _get_version() -> str:
  +    """Read VERSION.txt and return its contents."""
  +    path = Path(__file__).parent.resolve()
  +    version_file = path / "VERSION.txt"
  +    return version_file.read_text().strip()
  +
  +
  +__version__ = _get_version()
  diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -1,11 +1,22 @@
   """cookiecutter distutils configuration."""
  +from pathlib import Path
   from setuptools import setup
   
  -version = "2.2.3.dev0"
  +
  +def _get_version() -> str:
  +    """Read cookiecutter/VERSION.txt and return its contents."""
  +    path = Path("cookiecutter").resolve()
  +    version_file = path / "VERSION.txt"
  +    return version_file.read_text().strip()
  +
  +
  +version = _get_version()
  +
   
   with open('README.md', encoding='utf-8') as readme_file:
       readme = readme_file.read()
   
  +
   requirements = [
       'binaryornot>=0.4.4',
       'Jinja2>=2.7,<4.0.0',
  
verification_info: {"golden_diff": "diff --git a/cookiecutter/__init__.py b/cookiecutter/__init__.py\n--- a/cookiecutter/__init__.py\n+++ b/cookiecutter/__init__.py\n@@ -1,2 +1,12 @@\n \"\"\"Main package for Cookiecutter.\"\"\"\n-__version__ = \"2.1.2.dev0\"\n+from pathlib import Path\n+\n+\n+def _get_version() -> str:\n+    \"\"\"Read VERSION.txt and return its contents.\"\"\"\n+    path = Path(__file__).parent.resolve()\n+    version_file = path / \"VERSION.txt\"\n+    return version_file.read_text().strip()\n+\n+\n+__version__ = _get_version()\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,11 +1,22 @@\n \"\"\"cookiecutter distutils configuration.\"\"\"\n+from pathlib import Path\n from setuptools import setup\n \n-version = \"2.2.3.dev0\"\n+\n+def _get_version() -> str:\n+    \"\"\"Read cookiecutter/VERSION.txt and return its contents.\"\"\"\n+    path = Path(\"cookiecutter\").resolve()\n+    version_file = path / \"VERSION.txt\"\n+    return version_file.read_text().strip()\n+\n+\n+version = _get_version()\n+\n \n with open('README.md', encoding='utf-8') as readme_file:\n     readme = readme_file.read()\n \n+\n requirements = [\n     'binaryornot>=0.4.4',\n     'Jinja2>=2.7,<4.0.0',\n", "issue": "2.2.0 CLI reports version 2.1.2dev0 \n* Cookiecutter version: 2.2.0 (or 2.1.2dev0, depending on who you ask)\r\n* Template project url: n/a\r\n* Python version: 3.11\r\n* Operating System: linux\r\n\r\n### Description:\r\n\r\nGet the accurate version of cookiecutter from the CLI\r\n\r\n### What I've run:\r\n\r\n```bash\r\ncookiecutter --version\r\nCookiecutter 2.1.2.dev0 from $PREFIX/lib/python3.11/site-packages (Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:17) [GCC 12.2.0])\r\n```\r\n\r\nWould be a one-line fix, but ideally would be always be sourced from exactly one place:\r\n- `setup.py` and `importlib_metadata`\r\n- `__init__.py`\r\n- a `VERSION` file\n", "before_files": [{"content": "\"\"\"Main package for Cookiecutter.\"\"\"\n__version__ = \"2.1.2.dev0\"\n", "path": "cookiecutter/__init__.py"}, {"content": "\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom setuptools import setup\n\nversion = \"2.2.3.dev0\"\n\nwith open('README.md', encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\nrequirements = [\n    'binaryornot>=0.4.4',\n    'Jinja2>=2.7,<4.0.0',\n    'click>=7.0,<9.0.0',\n    'pyyaml>=5.3.1',\n    'python-slugify>=4.0.0',\n    'requests>=2.23.0',\n    'arrow',\n]\n\nsetup(\n    name='cookiecutter',\n    version=version,\n    description=(\n        'A command-line utility that creates projects from project '\n        'templates, e.g. creating a Python package project from a '\n        'Python package project template.'\n    ),\n    long_description=readme,\n    long_description_content_type='text/markdown',\n    author='Audrey Feldroy',\n    author_email='audreyr@gmail.com',\n    url='https://github.com/cookiecutter/cookiecutter',\n    project_urls={\n        \"Documentation\": \"https://cookiecutter.readthedocs.io\",\n        \"Issues\": \"https://github.com/cookiecutter/cookiecutter/issues\",\n        \"Discord\": \"https://discord.gg/9BrxzPKuEW\",\n    },\n    packages=['cookiecutter'],\n    package_dir={'cookiecutter': 'cookiecutter'},\n    entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},\n    include_package_data=True,\n    python_requires='>=3.7',\n    install_requires=requirements,\n    license='BSD',\n    zip_safe=False,\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Intended Audience :: Developers\",\n        \"Natural Language :: English\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Programming Language :: Python\",\n        \"Topic :: Software Development\",\n    ],\n    keywords=[\n        \"cookiecutter\",\n        \"Python\",\n        \"projects\",\n        \"project templates\",\n        \"Jinja2\",\n        \"skeleton\",\n        \"scaffolding\",\n        \"project directory\",\n        \"package\",\n        \"packaging\",\n    ],\n)\n", "path": "setup.py"}]}