diff --git a/setupext.py b/setupext.py index f473abb5d9c3..31f9b06d5c27 100755 --- a/setupext.py +++ b/setupext.py @@ -937,7 +937,7 @@ def check(self): # Early versions of freetype grep badly inside freetype-config, # so catch those cases. (tested with 2.5.3). - if 'No such file or directory\ngrep:' in version: + if version is None or 'No such file or directory\ngrep:' in version: version = self.version_from_header() return self._check_for_pkg_config(