--- siputils.py.orig 2010-09-03 03:26:37.000000000 +1000
+++ siputils.py 2010-10-31 02:55:12.000000000 +1100
# 'real_prefix' exists if virtualenv is being used.
dl = getattr(sys, 'real_prefix', sys.exec_prefix).split(os.sep)
- if "Python.framework" not in dl:
- error("SIP requires Python to be built as a framework")
+ #if "Python.framework" not in dl:
+ # error("SIP requires Python to be built as a framework")
self.LFLAGS.append("-undefined dynamic_lookup")
lhs = line[:assstart].strip()
rhs = line[assend + 1:].strip()
+ # check for X = foo $$X (like += but prepending)
+ s_start = rhs.find(lhs)
+# print "maybe found substr"
+ while s_pre_s >= 0 and rhs[s_pre_s] not in string.whitespace:
+ s_pre_str = rhs[s_pre_s:s_start]
+ while s_end < len(rhs) and rhs[s_end] not in string.whitespace:
+ s_str = rhs[s_start:s_end]
+# print "before: s_str =", s_str
+# print "befire: s_pre_str =", s_pre_str
+ if s_pre_str.find("$$") == 0:
+ # $$ something, maybe; find that something
+ if len(s_pre_str) == 3:
+# print "looking for brackets at end"
+ # verify termination is a bracket type
+ if s_str[len(s_str)-1] in "}]":
+ s_str = s_str[:(len(s_str)-1)]
+# print "s_str is", s_str
+ if len(s_str) == len(lhs):
+ # make sure 'lhs' is already in 'raw'
+ orig_rhs = raw.get(lhs)
+ if orig_rhs is not None:
+ rhs = rhs[:s_pre_s] + orig_rhs
+# print "new rhs is", rhs
# Remove the escapes for any quotes.
rhs = rhs.replace(r'\"', '"').replace(r"\'", "'")
rhs = orig_rhs + " " + rhs
+# print "new rhs is", rhs
+# print "added lhs = ", lhs, ", rhs = ", rhs