From ea191a892451ffa0506d5fa218c39943a81d4e43 Mon Sep 17 00:00:00 2001 From: KIAaze Date: Wed, 20 May 2020 23:13:11 +0100 Subject: [PATCH] Fixed AttributeError in the packaging script when using python>=3.8. platform.dist() is deprecated since python version 3.5 and was removed in version 3.8. Added exception to use the distro package in that case, as suggested by the python documentation: https://docs.python.org/3.7/library/platform.html?highlight=platform#module-platform --- package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.py b/package.py index 8d9b562a..216007c8 100644 --- a/package.py +++ b/package.py @@ -212,7 +212,11 @@ def main(): package_windows() else: if not args.arch_pkg: - distname, _, _ = platform.dist() + try: + distname, _, _ = platform.dist() + except AttributeError: + import distro + distname, _, _ = distro.linux_distribution(full_distribution_name=False) else: distname = "arch" if distname == "arch":