From 728da21cce8473ee2114edff7e7bb6ffbc8aa9d8 Mon Sep 17 00:00:00 2001 From: Chris Tomkins-Tinch Date: Wed, 22 Feb 2017 14:58:47 -0500 Subject: [PATCH] update conda package string regex (#597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit channel prefix can now be present in some versions (ex. “bioconda::biopython-1.68-py35_0”) --- tools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/__init__.py b/tools/__init__.py index 004a49cc7..1844cd007 100644 --- a/tools/__init__.py +++ b/tools/__init__.py @@ -479,7 +479,8 @@ def get_installed_version(self): installed_package_string = data[0]["dist_name"] else: installed_package_string = data[0] - package_info_re = re.compile(r"(?P.*)-(?P.*)-(?P.*)") + # regex to match package specs in the format bioconda::biopython-1.68-py35_0 + package_info_re = re.compile(r"(?:(?P.*)::)?(?P.*)-(?P.*)-(?P.*)") matches = package_info_re.match(installed_package_string) if matches: installed_version = matches.group("version")