Skip to content

Commit

Permalink
Late import distro to fix calling salt/version.py from setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch authored and dwoz committed May 14, 2020
1 parent 48e7e20 commit 9673de4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions salt/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import re
import sys

from distro import linux_distribution

MAX_SIZE = sys.maxsize
VERSION_LIMIT = MAX_SIZE - 200

Expand Down Expand Up @@ -668,11 +666,14 @@ def system_information():
"""
Report system versions.
"""
# Late import so that when getting called from setup.py does not break
from distro import linux_distribution

def system_version():
"""
Return host system version.
"""

lin_ver = linux_distribution()
mac_ver = platform.mac_ver()
win_ver = platform.win32_ver()
Expand Down

0 comments on commit 9673de4

Please sign in to comment.