From 0fca7d16962f3ee0adbcba42344f66c40571e7be Mon Sep 17 00:00:00 2001 From: finswimmer Date: Thu, 24 Sep 2020 20:32:30 +0200 Subject: [PATCH] new (utils.setup_reader): try to parse version found in setup.cfg --- poetry/utils/setup_reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poetry/utils/setup_reader.py b/poetry/utils/setup_reader.py index 6af89bc7981..6a45103c1f4 100644 --- a/poetry/utils/setup_reader.py +++ b/poetry/utils/setup_reader.py @@ -8,6 +8,8 @@ from typing import Tuple from typing import Union +from poetry.core.semver import Version + from ._compat import PY35 from ._compat import Path from ._compat import basestring @@ -109,7 +111,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 = {}