From 9f9dc9379db3e2acc0b2905fb150043bd2cf7530 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Wed, 22 Nov 2017 09:08:49 +0000 Subject: [PATCH] Replace deprecated platform.dist with file existence check --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ead5be6d7..bc9f9e6d9 100755 --- a/setup.py +++ b/setup.py @@ -313,7 +313,7 @@ class pil_build_ext(build_ext): elif sys.platform.startswith("linux"): arch_tp = (plat.processor(), plat.architecture()[0]) # This should be correct on debian derivatives. - if plat.dist()[0].lower() in ('debian', 'ubuntu'): + if os.path.exists('/etc/debian_version'): # If this doesn't work, don't just silently patch # downstream because it's going to break when people # try to build pillow from source instead of