Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest version of libfaketime to support mac os x sierra #29

Merged
merged 4 commits into from Jul 7, 2017
Merged

Use latest version of libfaketime to support mac os x sierra #29

merged 4 commits into from Jul 7, 2017

Conversation

smaris
Copy link

@smaris smaris commented Jul 3, 2017

No description provided.

@simon-weber
Copy link
Owner

My fork has a few changes I'll need to integrate, but thanks for the heads up that the upstream is good to go. I should have time for this tomorrow.

@smaris
Copy link
Author

smaris commented Jul 5, 2017

There still seems to be an issue. I don't get any errors anymore but the @fake_time decorator doesn't seem to work. Using the library directly it works:
faketime '2015-12-01T11:00:00' gdate
faketime '2015-12-01T11:00:00' date

but not with:
faketime '2015-12-01T11:00:00' /bin/date

from what I've seen in code the gdate version will be used with this library.

I've provided the exports DYLD_FORCE_FLAT_NAMESPACE=1, DYLD_INSERT_LIBRARIES=[path_to_this_repo/.../lifbfaketime.1.dylib] and LD_PRELOAD=[path_to_this_repo/.../lifbfaketime.1.dylib].

@simon-weber
Copy link
Owner

Well, the build passed. Locally I'm getting a segfault when running on El Cap, though.

@simon-weber
Copy link
Owner

Oh, I see, the new version isn't backwards compatible. I guess I'll add another submodule and hook it up on pre-sierra versions.

@simon-weber
Copy link
Owner

Ok, I think this works. @smaris can you test this out on sierra for me?

pip install git+https://github.com/smaris/python-libfaketime@fix/mac-os-x-sierra#egg=libfaketime
eval $(python-libfaketime)
echo -e 'from libfaketime import fake_time; import datetime\nwith fake_time("2014-01-01 00:00:00"):\n  print datetime.datetime.now()' | python

This should print 2014-01-01 00:00:00 if everything went well.

@smaris
Copy link
Author

smaris commented Jul 7, 2017

Yes it works! good job!

@simon-weber simon-weber merged commit d6c5076 into simon-weber:master Jul 7, 2017
@simon-weber
Copy link
Owner

Great! Thanks for getting everything going. I'll cut a release when I have a chance.

@simon-weber
Copy link
Owner

Ok, 0.4.3 is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants