We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix simple typo: specificed -> specified
- [x] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (`-vvv` option).

## Issue

# Issue Type

[x] Bug (Typo)

# Steps to Replicate

1. Examine poetry/masonry/builders/builder.py.
2. Search for `specificed`.

# Expected Behaviour

1. Should read `specified`.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `poetry/masonry/builders/builder.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 import re
3 import shutil
4 import tempfile
5 
6 from collections import defaultdict
7 from contextlib import contextmanager
8 from typing import Set
9 from typing import Union
10 
11 from clikit.api.io.flags import VERY_VERBOSE
12 
13 from poetry.utils._compat import Path
14 from poetry.utils._compat import glob
15 from poetry.utils._compat import lru_cache
16 from poetry.utils._compat import to_str
17 from poetry.vcs import get_vcs
18 
19 from ..metadata import Metadata
20 from ..utils.module import Module
21 from ..utils.package_include import PackageInclude
22 
23 
24 AUTHOR_REGEX = re.compile(r"(?u)^(?P<name>[- .,\w\d'’\"()]+) <(?P<email>.+?)>$")
25 
26 METADATA_BASE = """\
27 Metadata-Version: 2.1
28 Name: {name}
29 Version: {version}
30 Summary: {summary}
31 """
32 
33 
34 class Builder(object):
35     AVAILABLE_PYTHONS = {"2", "2.7", "3", "3.4", "3.5", "3.6", "3.7"}
36 
37     format = None
38 
39     def __init__(
40         self, poetry, env, io, ignore_packages_formats=False
41     ):  # type: ("Poetry", "Env", "IO", bool) -> None
42         self._poetry = poetry
43         self._env = env
44         self._io = io
45         self._package = poetry.package
46         self._path = poetry.file.parent
47 
48         packages = []
49         for p in self._package.packages:
50             formats = p.get("format", [])
51             if not isinstance(formats, list):
52                 formats = [formats]
53 
54             if (
55                 formats
56                 and self.format
57                 and self.format not in formats
58                 and not ignore_packages_formats
59             ):
60                 continue
61 
62             packages.append(p)
63 
64         self._module = Module(
65             self._package.name,
66             self._path.as_posix(),
67             packages=packages,
68             includes=self._package.include,
69         )
70         self._meta = Metadata.from_package(self._package)
71 
72     def build(self):
73         raise NotImplementedError()
74 
75     @lru_cache(maxsize=None)
76     def find_excluded_files(self):  # type: () -> Set[str]
77         # Checking VCS
78         vcs = get_vcs(self._path)
79         if not vcs:
80             vcs_ignored_files = set()
81         else:
82             vcs_ignored_files = set(vcs.get_ignored_files())
83 
84         explicitely_excluded = set()
85         for excluded_glob in self._package.exclude:
86 
87             for excluded in glob(
88                 Path(self._path, excluded_glob).as_posix(), recursive=True
89             ):
90                 explicitely_excluded.add(
91                     Path(excluded).relative_to(self._path).as_posix()
92                 )
93 
94         ignored = vcs_ignored_files | explicitely_excluded
95         result = set()
96         for file in ignored:
97             result.add(file)
98 
99         # The list of excluded files might be big and we will do a lot
100         # containment check (x in excluded).
101         # Returning a set make those tests much much faster.
102         return result
103 
104     def is_excluded(self, filepath):  # type: (Union[str, Path]) -> bool
105         exclude_path = Path(filepath)
106 
107         while True:
108             if exclude_path.as_posix() in self.find_excluded_files():
109                 return True
110 
111             if len(exclude_path.parts) > 1:
112                 exclude_path = exclude_path.parent
113             else:
114                 break
115 
116         return False
117 
118     def find_files_to_add(self, exclude_build=True):  # type: (bool) -> list
119         """
120         Finds all files to add to the tarball
121         """
122         to_add = []
123 
124         for include in self._module.includes:
125             for file in include.elements:
126                 if "__pycache__" in str(file):
127                     continue
128 
129                 if file.is_dir():
130                     continue
131 
132                 file = file.relative_to(self._path)
133 
134                 if self.is_excluded(file) and isinstance(include, PackageInclude):
135                     continue
136 
137                 if file.suffix == ".pyc":
138                     continue
139 
140                 if file in to_add:
141                     # Skip duplicates
142                     continue
143 
144                 self._io.write_line(
145                     " - Adding: <comment>{}</comment>".format(str(file)), VERY_VERBOSE
146                 )
147                 to_add.append(file)
148 
149         # Include project files
150         self._io.write_line(
151             " - Adding: <comment>pyproject.toml</comment>", VERY_VERBOSE
152         )
153         to_add.append(Path("pyproject.toml"))
154 
155         # If a license file exists, add it
156         for license_file in self._path.glob("LICENSE*"):
157             self._io.write_line(
158                 " - Adding: <comment>{}</comment>".format(
159                     license_file.relative_to(self._path)
160                 ),
161                 VERY_VERBOSE,
162             )
163             to_add.append(license_file.relative_to(self._path))
164 
165         # If a README is specificed we need to include it
166         # to avoid errors
167         if "readme" in self._poetry.local_config:
168             readme = self._path / self._poetry.local_config["readme"]
169             if readme.exists():
170                 self._io.write_line(
171                     " - Adding: <comment>{}</comment>".format(
172                         readme.relative_to(self._path)
173                     ),
174                     VERY_VERBOSE,
175                 )
176                 to_add.append(readme.relative_to(self._path))
177 
178         # If a build script is specified and explicitely required
179         # we add it to the list of files
180         if self._package.build and not exclude_build:
181             to_add.append(Path(self._package.build))
182 
183         return sorted(to_add)
184 
185     def get_metadata_content(self):  # type: () -> bytes
186         content = METADATA_BASE.format(
187             name=self._meta.name,
188             version=self._meta.version,
189             summary=to_str(self._meta.summary),
190         )
191 
192         # Optional fields
193         if self._meta.home_page:
194             content += "Home-page: {}\n".format(self._meta.home_page)
195 
196         if self._meta.license:
197             content += "License: {}\n".format(self._meta.license)
198 
199         if self._meta.keywords:
200             content += "Keywords: {}\n".format(self._meta.keywords)
201 
202         if self._meta.author:
203             content += "Author: {}\n".format(to_str(self._meta.author))
204 
205         if self._meta.author_email:
206             content += "Author-email: {}\n".format(to_str(self._meta.author_email))
207 
208         if self._meta.maintainer:
209             content += "Maintainer: {}\n".format(to_str(self._meta.maintainer))
210 
211         if self._meta.maintainer_email:
212             content += "Maintainer-email: {}\n".format(
213                 to_str(self._meta.maintainer_email)
214             )
215 
216         if self._meta.requires_python:
217             content += "Requires-Python: {}\n".format(self._meta.requires_python)
218 
219         for classifier in self._meta.classifiers:
220             content += "Classifier: {}\n".format(classifier)
221 
222         for extra in sorted(self._meta.provides_extra):
223             content += "Provides-Extra: {}\n".format(extra)
224 
225         for dep in sorted(self._meta.requires_dist):
226             content += "Requires-Dist: {}\n".format(dep)
227 
228         for url in sorted(self._meta.project_urls, key=lambda u: u[0]):
229             content += "Project-URL: {}\n".format(to_str(url))
230 
231         if self._meta.description_content_type:
232             content += "Description-Content-Type: {}\n".format(
233                 self._meta.description_content_type
234             )
235 
236         if self._meta.description is not None:
237             content += "\n" + to_str(self._meta.description) + "\n"
238 
239         return content
240 
241     def convert_entry_points(self):  # type: () -> dict
242         result = defaultdict(list)
243 
244         # Scripts -> Entry points
245         for name, ep in self._poetry.local_config.get("scripts", {}).items():
246             extras = ""
247             if isinstance(ep, dict):
248                 extras = "[{}]".format(", ".join(ep["extras"]))
249                 ep = ep["callable"]
250 
251             result["console_scripts"].append("{} = {}{}".format(name, ep, extras))
252 
253         # Plugins -> entry points
254         plugins = self._poetry.local_config.get("plugins", {})
255         for groupname, group in plugins.items():
256             for name, ep in sorted(group.items()):
257                 result[groupname].append("{} = {}".format(name, ep))
258 
259         for groupname in result:
260             result[groupname] = sorted(result[groupname])
261 
262         return dict(result)
263 
264     @classmethod
265     def convert_author(cls, author):  # type: (...) -> dict
266         m = AUTHOR_REGEX.match(author)
267 
268         name = m.group("name")
269         email = m.group("email")
270 
271         return {"name": name, "email": email}
272 
273     @classmethod
274     @contextmanager
275     def temporary_directory(cls, *args, **kwargs):
276         try:
277             from tempfile import TemporaryDirectory
278 
279             with TemporaryDirectory(*args, **kwargs) as name:
280                 yield name
281         except ImportError:
282             name = tempfile.mkdtemp(*args, **kwargs)
283 
284             yield name
285 
286             shutil.rmtree(name)
287
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/poetry/masonry/builders/builder.py b/poetry/masonry/builders/builder.py
--- a/poetry/masonry/builders/builder.py
+++ b/poetry/masonry/builders/builder.py
@@ -162,7 +162,7 @@
             )
             to_add.append(license_file.relative_to(self._path))
 
-        # If a README is specificed we need to include it
+        # If a README is specified we need to include it
         # to avoid errors
         if "readme" in self._poetry.local_config:
             readme = self._path / self._poetry.local_config["readme"]

{"golden_diff": "diff --git a/poetry/masonry/builders/builder.py b/poetry/masonry/builders/builder.py\n--- a/poetry/masonry/builders/builder.py\n+++ b/poetry/masonry/builders/builder.py\n@@ -162,7 +162,7 @@\n             )\n             to_add.append(license_file.relative_to(self._path))\n \n-        # If a README is specificed we need to include it\n+        # If a README is specified we need to include it\n         # to avoid errors\n         if \"readme\" in self._poetry.local_config:\n             readme = self._path / self._poetry.local_config[\"readme\"]\n", "issue": "Fix simple typo: specificed -> specified\n- [x] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version.\n- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.\n- [x] If an exception occurs when executing a command, I executed it again in debug mode (`-vvv` option).\n\n## Issue\n\n# Issue Type\n\n[x] Bug (Typo)\n\n# Steps to Replicate\n\n1. Examine poetry/masonry/builders/builder.py.\n2. Search for `specificed`.\n\n# Expected Behaviour\n\n1. Should read `specified`.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport re\nimport shutil\nimport tempfile\n\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom typing import Set\nfrom typing import Union\n\nfrom clikit.api.io.flags import VERY_VERBOSE\n\nfrom poetry.utils._compat import Path\nfrom poetry.utils._compat import glob\nfrom poetry.utils._compat import lru_cache\nfrom poetry.utils._compat import to_str\nfrom poetry.vcs import get_vcs\n\nfrom ..metadata import Metadata\nfrom ..utils.module import Module\nfrom ..utils.package_include import PackageInclude\n\n\nAUTHOR_REGEX = re.compile(r\"(?u)^(?P<name>[- .,\\w\\d'\u2019\\\"()]+) <(?P<email>.+?)>$\")\n\nMETADATA_BASE = \"\"\"\\\nMetadata-Version: 2.1\nName: {name}\nVersion: {version}\nSummary: {summary}\n\"\"\"\n\n\nclass Builder(object):\n    AVAILABLE_PYTHONS = {\"2\", \"2.7\", \"3\", \"3.4\", \"3.5\", \"3.6\", \"3.7\"}\n\n    format = None\n\n    def __init__(\n        self, poetry, env, io, ignore_packages_formats=False\n    ):  # type: (\"Poetry\", \"Env\", \"IO\", bool) -> None\n        self._poetry = poetry\n        self._env = env\n        self._io = io\n        self._package = poetry.package\n        self._path = poetry.file.parent\n\n        packages = []\n        for p in self._package.packages:\n            formats = p.get(\"format\", [])\n            if not isinstance(formats, list):\n                formats = [formats]\n\n            if (\n                formats\n                and self.format\n                and self.format not in formats\n                and not ignore_packages_formats\n            ):\n                continue\n\n            packages.append(p)\n\n        self._module = Module(\n            self._package.name,\n            self._path.as_posix(),\n            packages=packages,\n            includes=self._package.include,\n        )\n        self._meta = Metadata.from_package(self._package)\n\n    def build(self):\n        raise NotImplementedError()\n\n    @lru_cache(maxsize=None)\n    def find_excluded_files(self):  # type: () -> Set[str]\n        # Checking VCS\n        vcs = get_vcs(self._path)\n        if not vcs:\n            vcs_ignored_files = set()\n        else:\n            vcs_ignored_files = set(vcs.get_ignored_files())\n\n        explicitely_excluded = set()\n        for excluded_glob in self._package.exclude:\n\n            for excluded in glob(\n                Path(self._path, excluded_glob).as_posix(), recursive=True\n            ):\n                explicitely_excluded.add(\n                    Path(excluded).relative_to(self._path).as_posix()\n                )\n\n        ignored = vcs_ignored_files | explicitely_excluded\n        result = set()\n        for file in ignored:\n            result.add(file)\n\n        # The list of excluded files might be big and we will do a lot\n        # containment check (x in excluded).\n        # Returning a set make those tests much much faster.\n        return result\n\n    def is_excluded(self, filepath):  # type: (Union[str, Path]) -> bool\n        exclude_path = Path(filepath)\n\n        while True:\n            if exclude_path.as_posix() in self.find_excluded_files():\n                return True\n\n            if len(exclude_path.parts) > 1:\n                exclude_path = exclude_path.parent\n            else:\n                break\n\n        return False\n\n    def find_files_to_add(self, exclude_build=True):  # type: (bool) -> list\n        \"\"\"\n        Finds all files to add to the tarball\n        \"\"\"\n        to_add = []\n\n        for include in self._module.includes:\n            for file in include.elements:\n                if \"__pycache__\" in str(file):\n                    continue\n\n                if file.is_dir():\n                    continue\n\n                file = file.relative_to(self._path)\n\n                if self.is_excluded(file) and isinstance(include, PackageInclude):\n                    continue\n\n                if file.suffix == \".pyc\":\n                    continue\n\n                if file in to_add:\n                    # Skip duplicates\n                    continue\n\n                self._io.write_line(\n                    \" - Adding: <comment>{}</comment>\".format(str(file)), VERY_VERBOSE\n                )\n                to_add.append(file)\n\n        # Include project files\n        self._io.write_line(\n            \" - Adding: <comment>pyproject.toml</comment>\", VERY_VERBOSE\n        )\n        to_add.append(Path(\"pyproject.toml\"))\n\n        # If a license file exists, add it\n        for license_file in self._path.glob(\"LICENSE*\"):\n            self._io.write_line(\n                \" - Adding: <comment>{}</comment>\".format(\n                    license_file.relative_to(self._path)\n                ),\n                VERY_VERBOSE,\n            )\n            to_add.append(license_file.relative_to(self._path))\n\n        # If a README is specificed we need to include it\n        # to avoid errors\n        if \"readme\" in self._poetry.local_config:\n            readme = self._path / self._poetry.local_config[\"readme\"]\n            if readme.exists():\n                self._io.write_line(\n                    \" - Adding: <comment>{}</comment>\".format(\n                        readme.relative_to(self._path)\n                    ),\n                    VERY_VERBOSE,\n                )\n                to_add.append(readme.relative_to(self._path))\n\n        # If a build script is specified and explicitely required\n        # we add it to the list of files\n        if self._package.build and not exclude_build:\n            to_add.append(Path(self._package.build))\n\n        return sorted(to_add)\n\n    def get_metadata_content(self):  # type: () -> bytes\n        content = METADATA_BASE.format(\n            name=self._meta.name,\n            version=self._meta.version,\n            summary=to_str(self._meta.summary),\n        )\n\n        # Optional fields\n        if self._meta.home_page:\n            content += \"Home-page: {}\\n\".format(self._meta.home_page)\n\n        if self._meta.license:\n            content += \"License: {}\\n\".format(self._meta.license)\n\n        if self._meta.keywords:\n            content += \"Keywords: {}\\n\".format(self._meta.keywords)\n\n        if self._meta.author:\n            content += \"Author: {}\\n\".format(to_str(self._meta.author))\n\n        if self._meta.author_email:\n            content += \"Author-email: {}\\n\".format(to_str(self._meta.author_email))\n\n        if self._meta.maintainer:\n            content += \"Maintainer: {}\\n\".format(to_str(self._meta.maintainer))\n\n        if self._meta.maintainer_email:\n            content += \"Maintainer-email: {}\\n\".format(\n                to_str(self._meta.maintainer_email)\n            )\n\n        if self._meta.requires_python:\n            content += \"Requires-Python: {}\\n\".format(self._meta.requires_python)\n\n        for classifier in self._meta.classifiers:\n            content += \"Classifier: {}\\n\".format(classifier)\n\n        for extra in sorted(self._meta.provides_extra):\n            content += \"Provides-Extra: {}\\n\".format(extra)\n\n        for dep in sorted(self._meta.requires_dist):\n            content += \"Requires-Dist: {}\\n\".format(dep)\n\n        for url in sorted(self._meta.project_urls, key=lambda u: u[0]):\n            content += \"Project-URL: {}\\n\".format(to_str(url))\n\n        if self._meta.description_content_type:\n            content += \"Description-Content-Type: {}\\n\".format(\n                self._meta.description_content_type\n            )\n\n        if self._meta.description is not None:\n            content += \"\\n\" + to_str(self._meta.description) + \"\\n\"\n\n        return content\n\n    def convert_entry_points(self):  # type: () -> dict\n        result = defaultdict(list)\n\n        # Scripts -> Entry points\n        for name, ep in self._poetry.local_config.get(\"scripts\", {}).items():\n            extras = \"\"\n            if isinstance(ep, dict):\n                extras = \"[{}]\".format(\", \".join(ep[\"extras\"]))\n                ep = ep[\"callable\"]\n\n            result[\"console_scripts\"].append(\"{} = {}{}\".format(name, ep, extras))\n\n        # Plugins -> entry points\n        plugins = self._poetry.local_config.get(\"plugins\", {})\n        for groupname, group in plugins.items():\n            for name, ep in sorted(group.items()):\n                result[groupname].append(\"{} = {}\".format(name, ep))\n\n        for groupname in result:\n            result[groupname] = sorted(result[groupname])\n\n        return dict(result)\n\n    @classmethod\n    def convert_author(cls, author):  # type: (...) -> dict\n        m = AUTHOR_REGEX.match(author)\n\n        name = m.group(\"name\")\n        email = m.group(\"email\")\n\n        return {\"name\": name, \"email\": email}\n\n    @classmethod\n    @contextmanager\n    def temporary_directory(cls, *args, **kwargs):\n        try:\n            from tempfile import TemporaryDirectory\n\n            with TemporaryDirectory(*args, **kwargs) as name:\n                yield name\n        except ImportError:\n            name = tempfile.mkdtemp(*args, **kwargs)\n\n            yield name\n\n            shutil.rmtree(name)\n", "path": "poetry/masonry/builders/builder.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport re\nimport shutil\nimport tempfile\n\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom typing import Set\nfrom typing import Union\n\nfrom clikit.api.io.flags import VERY_VERBOSE\n\nfrom poetry.utils._compat import Path\nfrom poetry.utils._compat import glob\nfrom poetry.utils._compat import lru_cache\nfrom poetry.utils._compat import to_str\nfrom poetry.vcs import get_vcs\n\nfrom ..metadata import Metadata\nfrom ..utils.module import Module\nfrom ..utils.package_include import PackageInclude\n\n\nAUTHOR_REGEX = re.compile(r\"(?u)^(?P<name>[- .,\\w\\d'\u2019\\\"()]+) <(?P<email>.+?)>$\")\n\nMETADATA_BASE = \"\"\"\\\nMetadata-Version: 2.1\nName: {name}\nVersion: {version}\nSummary: {summary}\n\"\"\"\n\n\nclass Builder(object):\n    AVAILABLE_PYTHONS = {\"2\", \"2.7\", \"3\", \"3.4\", \"3.5\", \"3.6\", \"3.7\"}\n\n    format = None\n\n    def __init__(\n        self, poetry, env, io, ignore_packages_formats=False\n    ):  # type: (\"Poetry\", \"Env\", \"IO\", bool) -> None\n        self._poetry = poetry\n        self._env = env\n        self._io = io\n        self._package = poetry.package\n        self._path = poetry.file.parent\n\n        packages = []\n        for p in self._package.packages:\n            formats = p.get(\"format\", [])\n            if not isinstance(formats, list):\n                formats = [formats]\n\n            if (\n                formats\n                and self.format\n                and self.format not in formats\n                and not ignore_packages_formats\n            ):\n                continue\n\n            packages.append(p)\n\n        self._module = Module(\n            self._package.name,\n            self._path.as_posix(),\n            packages=packages,\n            includes=self._package.include,\n        )\n        self._meta = Metadata.from_package(self._package)\n\n    def build(self):\n        raise NotImplementedError()\n\n    @lru_cache(maxsize=None)\n    def find_excluded_files(self):  # type: () -> Set[str]\n        # Checking VCS\n        vcs = get_vcs(self._path)\n        if not vcs:\n            vcs_ignored_files = set()\n        else:\n            vcs_ignored_files = set(vcs.get_ignored_files())\n\n        explicitely_excluded = set()\n        for excluded_glob in self._package.exclude:\n\n            for excluded in glob(\n                Path(self._path, excluded_glob).as_posix(), recursive=True\n            ):\n                explicitely_excluded.add(\n                    Path(excluded).relative_to(self._path).as_posix()\n                )\n\n        ignored = vcs_ignored_files | explicitely_excluded\n        result = set()\n        for file in ignored:\n            result.add(file)\n\n        # The list of excluded files might be big and we will do a lot\n        # containment check (x in excluded).\n        # Returning a set make those tests much much faster.\n        return result\n\n    def is_excluded(self, filepath):  # type: (Union[str, Path]) -> bool\n        exclude_path = Path(filepath)\n\n        while True:\n            if exclude_path.as_posix() in self.find_excluded_files():\n                return True\n\n            if len(exclude_path.parts) > 1:\n                exclude_path = exclude_path.parent\n            else:\n                break\n\n        return False\n\n    def find_files_to_add(self, exclude_build=True):  # type: (bool) -> list\n        \"\"\"\n        Finds all files to add to the tarball\n        \"\"\"\n        to_add = []\n\n        for include in self._module.includes:\n            for file in include.elements:\n                if \"__pycache__\" in str(file):\n                    continue\n\n                if file.is_dir():\n                    continue\n\n                file = file.relative_to(self._path)\n\n                if self.is_excluded(file) and isinstance(include, PackageInclude):\n                    continue\n\n                if file.suffix == \".pyc\":\n                    continue\n\n                if file in to_add:\n                    # Skip duplicates\n                    continue\n\n                self._io.write_line(\n                    \" - Adding: <comment>{}</comment>\".format(str(file)), VERY_VERBOSE\n                )\n                to_add.append(file)\n\n        # Include project files\n        self._io.write_line(\n            \" - Adding: <comment>pyproject.toml</comment>\", VERY_VERBOSE\n        )\n        to_add.append(Path(\"pyproject.toml\"))\n\n        # If a license file exists, add it\n        for license_file in self._path.glob(\"LICENSE*\"):\n            self._io.write_line(\n                \" - Adding: <comment>{}</comment>\".format(\n                    license_file.relative_to(self._path)\n                ),\n                VERY_VERBOSE,\n            )\n            to_add.append(license_file.relative_to(self._path))\n\n        # If a README is specified we need to include it\n        # to avoid errors\n        if \"readme\" in self._poetry.local_config:\n            readme = self._path / self._poetry.local_config[\"readme\"]\n            if readme.exists():\n                self._io.write_line(\n                    \" - Adding: <comment>{}</comment>\".format(\n                        readme.relative_to(self._path)\n                    ),\n                    VERY_VERBOSE,\n                )\n                to_add.append(readme.relative_to(self._path))\n\n        # If a build script is specified and explicitely required\n        # we add it to the list of files\n        if self._package.build and not exclude_build:\n            to_add.append(Path(self._package.build))\n\n        return sorted(to_add)\n\n    def get_metadata_content(self):  # type: () -> bytes\n        content = METADATA_BASE.format(\n            name=self._meta.name,\n            version=self._meta.version,\n            summary=to_str(self._meta.summary),\n        )\n\n        # Optional fields\n        if self._meta.home_page:\n            content += \"Home-page: {}\\n\".format(self._meta.home_page)\n\n        if self._meta.license:\n            content += \"License: {}\\n\".format(self._meta.license)\n\n        if self._meta.keywords:\n            content += \"Keywords: {}\\n\".format(self._meta.keywords)\n\n        if self._meta.author:\n            content += \"Author: {}\\n\".format(to_str(self._meta.author))\n\n        if self._meta.author_email:\n            content += \"Author-email: {}\\n\".format(to_str(self._meta.author_email))\n\n        if self._meta.maintainer:\n            content += \"Maintainer: {}\\n\".format(to_str(self._meta.maintainer))\n\n        if self._meta.maintainer_email:\n            content += \"Maintainer-email: {}\\n\".format(\n                to_str(self._meta.maintainer_email)\n            )\n\n        if self._meta.requires_python:\n            content += \"Requires-Python: {}\\n\".format(self._meta.requires_python)\n\n        for classifier in self._meta.classifiers:\n            content += \"Classifier: {}\\n\".format(classifier)\n\n        for extra in sorted(self._meta.provides_extra):\n            content += \"Provides-Extra: {}\\n\".format(extra)\n\n        for dep in sorted(self._meta.requires_dist):\n            content += \"Requires-Dist: {}\\n\".format(dep)\n\n        for url in sorted(self._meta.project_urls, key=lambda u: u[0]):\n            content += \"Project-URL: {}\\n\".format(to_str(url))\n\n        if self._meta.description_content_type:\n            content += \"Description-Content-Type: {}\\n\".format(\n                self._meta.description_content_type\n            )\n\n        if self._meta.description is not None:\n            content += \"\\n\" + to_str(self._meta.description) + \"\\n\"\n\n        return content\n\n    def convert_entry_points(self):  # type: () -> dict\n        result = defaultdict(list)\n\n        # Scripts -> Entry points\n        for name, ep in self._poetry.local_config.get(\"scripts\", {}).items():\n            extras = \"\"\n            if isinstance(ep, dict):\n                extras = \"[{}]\".format(\", \".join(ep[\"extras\"]))\n                ep = ep[\"callable\"]\n\n            result[\"console_scripts\"].append(\"{} = {}{}\".format(name, ep, extras))\n\n        # Plugins -> entry points\n        plugins = self._poetry.local_config.get(\"plugins\", {})\n        for groupname, group in plugins.items():\n            for name, ep in sorted(group.items()):\n                result[groupname].append(\"{} = {}\".format(name, ep))\n\n        for groupname in result:\n            result[groupname] = sorted(result[groupname])\n\n        return dict(result)\n\n    @classmethod\n    def convert_author(cls, author):  # type: (...) -> dict\n        m = AUTHOR_REGEX.match(author)\n\n        name = m.group(\"name\")\n        email = m.group(\"email\")\n\n        return {\"name\": name, \"email\": email}\n\n    @classmethod\n    @contextmanager\n    def temporary_directory(cls, *args, **kwargs):\n        try:\n            from tempfile import TemporaryDirectory\n\n            with TemporaryDirectory(*args, **kwargs) as name:\n                yield name\n        except ImportError:\n            name = tempfile.mkdtemp(*args, **kwargs)\n\n            yield name\n\n            shutil.rmtree(name)\n", "path": "poetry/masonry/builders/builder.py"}]}