forcing python3 to build4mac, for now.

This commit is contained in:
Thomas Ferreira de Lima 2018-03-15 01:09:21 -04:00
parent d724d6b795
commit 4d82b313b9
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python #! /usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
#=============================================================================== #===============================================================================
@ -21,7 +21,7 @@ try:
from pathlib import Path from pathlib import Path
Path().expanduser() Path().expanduser()
except (ImportError,AttributeError): # python2 except (ImportError,AttributeError): # python2
from pathlib2 import Path raise RuntimeError("Need python3 to run this script, for now...")
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
## To import global dictionaries of different modules ## To import global dictionaries of different modules
@ -204,8 +204,14 @@ def WalkLibDependencyTree( dylibPath, depth=0, filter_regex=r'\t+/usr/local/opt'
else: else:
raise RuntimeError("Exceeded maximum recursion depth.") raise RuntimeError("Exceeded maximum recursion depth.")
def WalkFrameworkPaths(*frameworkPaths, filter_regex=r'\.(so|dylib)$'): def WalkFrameworkPaths(frameworkPaths, filter_regex=r'\.(so|dylib)$'):
try:
frameworkPathsIter = iter(frameworkPaths)
except TypeError:
frameworkPathsIter = [frameworkPaths]
dependency_dict = dict() dependency_dict = dict()
for frameworkPath in frameworkPaths: for frameworkPath in frameworkPaths:
frameworkPath = str(Path(frameworkPath)) frameworkPath = str(Path(frameworkPath))
find_grep_results = os.popen('find %s -type f | grep -E "%s"' % (frameworkPath, filter_regex)).read().split('\n') find_grep_results = os.popen('find %s -type f | grep -E "%s"' % (frameworkPath, filter_regex)).read().split('\n')