From 450faba7c38c91241deda8d70160f2a1a369aba2 Mon Sep 17 00:00:00 2001 From: moyogo Date: Fri, 21 Nov 2014 17:07:55 +0000 Subject: [PATCH] Res is not available in Python 3 --- Lib/fontTools/ttLib/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Lib/fontTools/ttLib/__init__.py b/Lib/fontTools/ttLib/__init__.py index 928c708aa..3c832a3ee 100644 --- a/Lib/fontTools/ttLib/__init__.py +++ b/Lib/fontTools/ttLib/__init__.py @@ -49,9 +49,11 @@ import sys haveMacSupport = 0 if sys.platform == "mac": haveMacSupport = 1 -elif sys.platform == "darwin" and sys.version_info[:3] != (2, 2, 0): - # Python 2.2's Mac support is broken, so don't enable it there. - haveMacSupport = 1 +elif sys.platform == "darwin": + if sys.version_info[:3] != (2, 2, 0) and sys.version_info[:1] < (3,): + # Python 2.2's Mac support is broken, so don't enable it there. + # Python 3 does not have Res used by macUtils + haveMacSupport = 1 class TTLibError(Exception): pass