Skip to content

Commit

Permalink
Always import platform
Browse files Browse the repository at this point in the history
Long gone are the days this was not available
  • Loading branch information
ktf committed Oct 17, 2023
1 parent f8a3829 commit 76471e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alibuild_helpers/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import sys
import os
import re
import platform

from datetime import datetime
try:
from collections import OrderedDict
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand All @@ -209,7 +209,7 @@ def detectArch():
except:
pass
try:
import platform, distro
import distro
platformTuple = distro.linux_distribution()
platformSystem = platform.system()
platformProcessor = platform.processor()
Expand Down

0 comments on commit 76471e8

Please sign in to comment.