From b4247409c62d23b6e97936c653af5c1e36c8133a Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Sat, 6 Feb 2021 22:59:57 +0200 Subject: [PATCH] Work around deprecation of platform.dist() in recent python --- setup.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 56d87308..1c1de454 100644 --- a/setup.py +++ b/setup.py @@ -95,11 +95,14 @@ if __name__ == "__main__": ['desktop/icons/24x24/pybitmessage.png']) ] - if platform.dist()[0] in ('Debian', 'Ubuntu'): - data_files += [ - ("etc/apparmor.d/", - ['packages/apparmor/pybitmessage']) - ] + try: + if platform.dist()[0] in ('Debian', 'Ubuntu'): + data_files += [ + ("etc/apparmor.d/", + ['packages/apparmor/pybitmessage']) + ] + except AttributeError: + pass # FIXME: use distro for more recent python dist = setup( name='pybitmessage',