From eaf5153b70861c339b7fbea604d228d6716ce9df Mon Sep 17 00:00:00 2001 From: Christian Schmidbauer Date: Tue, 21 Oct 2025 16:22:54 +0200 Subject: [PATCH] fix: only download files for matching platforms If we always specify ".*linux.*x86_64" we will get wheels for musllinux as well as manylinux, even if the user explicitly specified a regex for only manylinux in morgan.ini This is a follow-up fix of #26 that seems to have forgotten the if/else here. --- morgan/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/morgan/__init__.py b/morgan/__init__.py index 755fed9..021fbcb 100644 --- a/morgan/__init__.py +++ b/morgan/__init__.py @@ -64,11 +64,15 @@ def __init__(self, args: argparse.Namespace): self._supported_pyversions.append(env["python_version"]) if "platform_tag" in env: self._supported_platforms.append(re.compile(env["platform_tag"])) - self._supported_platforms.append( - re.compile( - r".*" + env["sys_platform"] + r".*" + env["platform_machine"] + else: + self._supported_platforms.append( + re.compile( + r".*" + + env["sys_platform"] + + r".*" + + env["platform_machine"] + ) ) - ) self._processed_pkgs = Cache()