Skip to content

Commit

Permalink
new (utils.setup_reader): try to parse version found in setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
finswimmer committed Sep 24, 2020
1 parent 41f7b7c commit d5f5cbe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions poetry/utils/setup_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ def read_setup_py(
return self.DEFAULT

result["name"] = self._find_single_string(setup_call, body, "name")
result["version"] = Version.parse(
self._find_single_string(setup_call, body, "version")
).text
result["version"] = self._find_single_string(setup_call, body, "version")
result["install_requires"] = self._find_install_requires(setup_call, body)
result["extras_require"] = self._find_extras_require(setup_call, body)
result["python_requires"] = self._find_single_string(
Expand All @@ -112,7 +110,7 @@ def read_setup_cfg(
name = parser.get("metadata", "name")

if parser.has_option("metadata", "version"):
version = parser.get("metadata", "version")
version = Version.parse(parser.get("metadata", "version")).text

install_requires = []
extras_require = {}
Expand Down

0 comments on commit d5f5cbe

Please sign in to comment.