From f5af805ff727cfa713b287a864184410e7634370 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:23:18 +0200 Subject: [PATCH] Always import platform Long gone are the days this was not available --- alibuild_helpers/utilities.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alibuild_helpers/utilities.py b/alibuild_helpers/utilities.py index cf9a402c..03076fef 100644 --- a/alibuild_helpers/utilities.py +++ b/alibuild_helpers/utilities.py @@ -7,6 +7,8 @@ import sys import os import re +import platform + from datetime import datetime try: from collections import OrderedDict @@ -141,7 +143,6 @@ def doDetectArch(hasOsRelease, osReleaseLines, platformTuple, pSystem, platformP if pSystem == "Darwin": processor = platformProcessor if not processor: - import platform if platform.machine() == "x86_64": processor = "x86-64" else: @@ -200,7 +201,6 @@ def detectArch(): osReleaseLines = [] hasOsRelease = False try: - import platform if platform.system() == "Darwin": if platform.machine() == "x86_64": return "osx_x86-64" @@ -209,7 +209,7 @@ def detectArch(): except: pass try: - import platform, distro + import distro platformTuple = distro.linux_distribution() platformSystem = platform.system() platformProcessor = platform.processor()