prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [Bug report] Static files are not copied on pip installation
  How to reproduce the behaviour
  ---------
  Seems like (some?) static files are not copied on pip installation.
  For instance `http://site.com/favicon.ico` is available on Docker Compose installation. But it is 404'd on pip installation.
  
  Your Environment
  ---------
  <!-- Include details of your environment.-->
  *   Operating System: CentOS 8.3
  *   Python Version Used: 3.8.8
  *   When you install doccano: v1.2.1
  *   How did you install doccano (Heroku button etc): pip
  
  
  </issue>
  <code>
  [start of backend/config/urls.py]
  1 """app URL Configuration
  2 
  3 The `urlpatterns` list routes URLs to views. For more information please see:
  4     https://docs.djangoproject.com/en/2.0/topics/http/urls/
  5 Examples:
  6 Function views
  7     1. Add an import:  from my_app import views
  8     2. Add a URL to urlpatterns:  path('', views.home, name='home')
  9 Class-based views
  10     1. Add an import:  from other_app.views import Home
  11     2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
  12 Including another URLconf
  13     1. Import the include() function: from django.urls import include, path
  14     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
  15 """
  16 import os
  17 import re
  18 
  19 from django.conf import settings
  20 from django.contrib import admin
  21 from django.contrib.auth.views import TemplateView
  22 from django.urls import include, path, re_path
  23 from django.views.static import serve
  24 from drf_yasg import openapi
  25 from drf_yasg.views import get_schema_view
  26 
  27 schema_view = get_schema_view(
  28     openapi.Info(
  29         title="doccano API",
  30         default_version="v1",
  31         description="doccano API description",
  32         license=openapi.License(name="MIT License"),
  33     ),
  34     public=True,
  35 )
  36 
  37 urlpatterns = []
  38 if settings.DEBUG or os.environ.get("STANDALONE", False):
  39     # For showing images and audios in the case of pip and Docker.
  40     urlpatterns.append(
  41         re_path(
  42             r"^%s(?P<path>.*)$" % re.escape(settings.MEDIA_URL.lstrip("/")),
  43             serve,
  44             {"document_root": settings.MEDIA_ROOT},
  45         )
  46     )
  47 
  48 urlpatterns += [
  49     path("admin/", admin.site.urls),
  50     path("api-auth/", include("rest_framework.urls")),
  51     path("v1/health/", include("health_check.urls")),
  52     path("v1/", include("api.urls")),
  53     path("v1/", include("roles.urls")),
  54     path("v1/", include("users.urls")),
  55     path("v1/", include("data_import.urls")),
  56     path("v1/", include("data_export.urls")),
  57     path("v1/", include("projects.urls")),
  58     path("v1/projects/<int:project_id>/metrics/", include("metrics.urls")),
  59     path("v1/projects/<int:project_id>/", include("auto_labeling.urls")),
  60     path("v1/projects/<int:project_id>/", include("examples.urls")),
  61     path("v1/projects/<int:project_id>/", include("labels.urls")),
  62     path("v1/projects/<int:project_id>/", include("label_types.urls")),
  63     path("swagger/", schema_view.with_ui("swagger", cache_timeout=0), name="schema-swagger-ui"),
  64     re_path("", TemplateView.as_view(template_name="index.html")),
  65 ]
  66
  [end of backend/config/urls.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/backend/config/urls.py b/backend/config/urls.py
  --- a/backend/config/urls.py
  +++ b/backend/config/urls.py
  @@ -15,6 +15,7 @@
   """
   import os
   import re
  +from pathlib import Path
   
   from django.conf import settings
   from django.contrib import admin
  @@ -36,6 +37,7 @@
   
   urlpatterns = []
   if settings.DEBUG or os.environ.get("STANDALONE", False):
  +    static_dir = Path(__file__).resolve().parent.parent / "client" / "dist"
       # For showing images and audios in the case of pip and Docker.
       urlpatterns.append(
           re_path(
  @@ -44,6 +46,8 @@
               {"document_root": settings.MEDIA_ROOT},
           )
       )
  +    # For showing favicon on the case of pip and Docker.
  +    urlpatterns.append(path("favicon.ico", serve, {"document_root": static_dir, "path": "favicon.ico"}))
   
   urlpatterns += [
       path("admin/", admin.site.urls),
  
verification_info: {"golden_diff": "diff --git a/backend/config/urls.py b/backend/config/urls.py\n--- a/backend/config/urls.py\n+++ b/backend/config/urls.py\n@@ -15,6 +15,7 @@\n \"\"\"\n import os\n import re\n+from pathlib import Path\n \n from django.conf import settings\n from django.contrib import admin\n@@ -36,6 +37,7 @@\n \n urlpatterns = []\n if settings.DEBUG or os.environ.get(\"STANDALONE\", False):\n+    static_dir = Path(__file__).resolve().parent.parent / \"client\" / \"dist\"\n     # For showing images and audios in the case of pip and Docker.\n     urlpatterns.append(\n         re_path(\n@@ -44,6 +46,8 @@\n             {\"document_root\": settings.MEDIA_ROOT},\n         )\n     )\n+    # For showing favicon on the case of pip and Docker.\n+    urlpatterns.append(path(\"favicon.ico\", serve, {\"document_root\": static_dir, \"path\": \"favicon.ico\"}))\n \n urlpatterns += [\n     path(\"admin/\", admin.site.urls),\n", "issue": "[Bug report] Static files are not copied on pip installation\nHow to reproduce the behaviour\r\n---------\r\nSeems like (some?) static files are not copied on pip installation.\r\nFor instance `http://site.com/favicon.ico` is available on Docker Compose installation. But it is 404'd on pip installation.\r\n\r\nYour Environment\r\n---------\r\n<!-- Include details of your environment.-->\r\n*   Operating System: CentOS 8.3\r\n*   Python Version Used: 3.8.8\r\n*   When you install doccano: v1.2.1\r\n*   How did you install doccano (Heroku button etc): pip\r\n\n", "before_files": [{"content": "\"\"\"app URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n    https://docs.djangoproject.com/en/2.0/topics/http/urls/\nExamples:\nFunction views\n    1. Add an import:  from my_app import views\n    2. Add a URL to urlpatterns:  path('', views.home, name='home')\nClass-based views\n    1. Add an import:  from other_app.views import Home\n    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')\nIncluding another URLconf\n    1. Import the include() function: from django.urls import include, path\n    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))\n\"\"\"\nimport os\nimport re\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth.views import TemplateView\nfrom django.urls import include, path, re_path\nfrom django.views.static import serve\nfrom drf_yasg import openapi\nfrom drf_yasg.views import get_schema_view\n\nschema_view = get_schema_view(\n    openapi.Info(\n        title=\"doccano API\",\n        default_version=\"v1\",\n        description=\"doccano API description\",\n        license=openapi.License(name=\"MIT License\"),\n    ),\n    public=True,\n)\n\nurlpatterns = []\nif settings.DEBUG or os.environ.get(\"STANDALONE\", False):\n    # For showing images and audios in the case of pip and Docker.\n    urlpatterns.append(\n        re_path(\n            r\"^%s(?P<path>.*)$\" % re.escape(settings.MEDIA_URL.lstrip(\"/\")),\n            serve,\n            {\"document_root\": settings.MEDIA_ROOT},\n        )\n    )\n\nurlpatterns += [\n    path(\"admin/\", admin.site.urls),\n    path(\"api-auth/\", include(\"rest_framework.urls\")),\n    path(\"v1/health/\", include(\"health_check.urls\")),\n    path(\"v1/\", include(\"api.urls\")),\n    path(\"v1/\", include(\"roles.urls\")),\n    path(\"v1/\", include(\"users.urls\")),\n    path(\"v1/\", include(\"data_import.urls\")),\n    path(\"v1/\", include(\"data_export.urls\")),\n    path(\"v1/\", include(\"projects.urls\")),\n    path(\"v1/projects/<int:project_id>/metrics/\", include(\"metrics.urls\")),\n    path(\"v1/projects/<int:project_id>/\", include(\"auto_labeling.urls\")),\n    path(\"v1/projects/<int:project_id>/\", include(\"examples.urls\")),\n    path(\"v1/projects/<int:project_id>/\", include(\"labels.urls\")),\n    path(\"v1/projects/<int:project_id>/\", include(\"label_types.urls\")),\n    path(\"swagger/\", schema_view.with_ui(\"swagger\", cache_timeout=0), name=\"schema-swagger-ui\"),\n    re_path(\"\", TemplateView.as_view(template_name=\"index.html\")),\n]\n", "path": "backend/config/urls.py"}]}