From 75f2cf6c862ff6d40961fa1f6df00566c779efe2 Mon Sep 17 00:00:00 2001
From: Joe Garcia <joe.garcia@ssec.wisc.edu>
Date: Tue, 14 Jan 2014 14:21:02 -0600
Subject: [PATCH] 32bit mac update for rpath

---
 ShellB3/sbin/thosewhohuntelfs.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ShellB3/sbin/thosewhohuntelfs.py b/ShellB3/sbin/thosewhohuntelfs.py
index 1840993c..1f6dd028 100755
--- a/ShellB3/sbin/thosewhohuntelfs.py
+++ b/ShellB3/sbin/thosewhohuntelfs.py
@@ -19,6 +19,7 @@ Copyright (c) 2013 University of Wisconsin SSEC. All rights reserved.
 import os, sys
 import logging, re
 import subprocess as sp
+import platform
 
 LOG = logging.getLogger(__name__)
 
@@ -396,10 +397,11 @@ def thosewhohuntelfs(base, *rpaths,**kwargs):
             dirp, fn = os.path.split(apath)
             mybase=base
             add_rpaths = [join('@loader_path',os.path.relpath(base,dirp))]
-            for an_rpath in ('Library/Frameworks/Python.framework','Library/Frameworks/Python.framework/Versions/2.7'):#,'Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents'):
-                if an_rpath in path:
-                    mybase=os.path.join(base,an_rpath)
-                    add_rpaths.insert(0,join('@loader_path',os.path.relpath(mybase,dirp)))
+            if platform.machine()=='x86_64':#32bit mac can't do multiple paths safely
+                for an_rpath in ('Library/Frameworks/Python.framework','Library/Frameworks/Python.framework/Versions/2.7'):#,'Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents'):
+                    if an_rpath in path:
+                        mybase=os.path.join(base,an_rpath)
+                        add_rpaths.insert(0,join('@loader_path',os.path.relpath(mybase,dirp)))
             rels = [os.path.relpath(rp, dirp) for rp in rpaths]
             brels = [first_uplevel_relative(rp,add_rpaths,loader=apath) for rp in rpaths]
             #bmigrate = ['@rpath','/usr','/System','/opt/X11/lib'] #['@rpath' for p in migrate]
-- 
GitLab