This is an archive of the discontinued LLVM Phabricator instance.

Fix script import --allow-reload on Python 3
ClosedPublic

Authored by zturner on Dec 3 2015, 2:18 PM.

Details

Summary

I think this patch may require some xcode changes. This is because of the from six.moves import reload_module. In the CMake build as part of the swig wrapper python script we symlink the six module from lldb/third_party/Python/modules/six to be in LLDB's private lib/site-packages directory. This way we can import six from within lldb.

This may not be happening on the Xcode build yet, which if so this will fail on Xcode build. Would someone mind helping me out with this part? LMK if I should submit as is and you fix up the xcode build later, or you want to do it as one patch.

Diff Detail

Event Timeline

zturner updated this revision to Diff 41802.Dec 3 2015, 2:18 PM
zturner retitled this revision from to Fix script import --allow-reload on Python 3.
zturner updated this object.
zturner added reviewers: granata.enrico, tfiala.
zturner added a subscriber: lldb-commits.
tfiala edited edge metadata.Dec 3 2015, 3:34 PM

Yep - I can make sure this works on Xcode tonight. I'll either direct send you the diff or incorporate it with what you have here.

It probably won't be until much later tonight, but I'll definitely hit this.

tfiala added a comment.Dec 3 2015, 9:09 PM

Doesn't look like I can hit this until the morning. But it'll be first thing on my list.

tfiala added a comment.Dec 4 2015, 9:12 AM

Looking at this now.

tfiala accepted this revision.Dec 4 2015, 10:25 AM
tfiala edited edge metadata.

Hey Zachary,

As best as I can tell, we don't need to do anything here, at least not on OS X El Capitan, because six is already included in the OS X Python distribution.

I was scratching my head for a while to figure out why, but that seems to be it.

I'd be okay with leaving this as is without any Xcode change. I will be cleaning up the "finish" step of the python script handling, much like I did for the front end a few weeks ago. When I do that, Xcode will switch to the finisher, and will pick up the "lldb official" in-repo version of six we're using. I'd rather not create the extra work of addressing "which six" at this point given that other pending work.

All the tests run on a clean build after with no new errors. (OS X right now seems to have one error and one failure on a clean public system at this point, but that is not a result of this change). I also exercised the in-lldb script handling and that seemed to be working.

This revision is now accepted and ready to land.Dec 4 2015, 10:25 AM

Thanks, I'll commit this later today then.

Can this be closed out?

granata.enrico accepted this revision.Jan 21 2016, 9:00 AM
granata.enrico edited edge metadata.

Yes, I believe so.

zturner closed this revision.Jan 21 2016, 10:59 AM