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 abae7e9 commit f7234bb
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 @@ -135,7 +137,6 @@ def doDetectArch(hasOsRelease, osReleaseLines, platformTuple, platformSystem, pl
if platformSystem == "Darwin":
processor = platformProcessor
if not processor:
import platform
if platform.machine() == "x86_64":
processor = "x86-64"
else:
Expand Down Expand Up @@ -194,7 +195,6 @@ def detectArch():
osReleaseLines = []
hasOsRelease = False
try:
import platform
if platform.system() == "Darwin":
if platform.machine() == "x86_64":
return "osx_x86-64"
Expand All @@ -203,7 +203,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 f7234bb

Please sign in to comment.