From 8accdf1136f259257717763a89431cab28685741 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 25 Mar 2021 10:33:04 +0100 Subject: [PATCH] makewheel: Fix Python 2.7 build on macOS --- makepanda/makewheel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/makepanda/makewheel.py b/makepanda/makewheel.py index b9de5fd225..771a9eb41a 100644 --- a/makepanda/makewheel.py +++ b/makepanda/makewheel.py @@ -405,7 +405,12 @@ class WheelFile(object): # Now add dependencies. On macOS, fix @loader_path references. if sys.platform == "darwin": - is_unsigned = subprocess.call(['codesign', '-d', temp.name], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + if sys.version_info >= (3, 3): + devnull = subprocess.DEVNULL + else: + devnull = open(os.devnull, 'wb') + is_unsigned = subprocess.call(['codesign', '-d', temp.name], stdout=devnull, stderr=devnull) + if source_path.endswith('deploy-stubw'): deps_path = '@executable_path/../Frameworks' else: