Skip to content

Commit

Permalink
Restore compatibility with aix_support on Python 3.8 and earlier. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 1, 2020
1 parent cdcdda0 commit 607b411
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions distutils/py38compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def aix_platform(osname, version, release):
try:
import _aix_support
return _aix_support.aix_platform()
except ImportError:
pass
return "%s-%s.%s" % (osname, version, release)
4 changes: 2 additions & 2 deletions distutils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def get_host_platform():
machine += ".%s" % bitness[sys.maxsize]
# fall through to standard osname-release-machine representation
elif osname[:3] == "aix":
from _aix_support import aix_platform
return aix_platform()
from .py38compat import aix_platform
return aix_platform(osname, version, release)
elif osname[:6] == "cygwin":
osname = "cygwin"
rel_re = re.compile (r'[\d.]+', re.ASCII)
Expand Down

0 comments on commit 607b411

Please sign in to comment.