phensley / python-smhasher

Python 2.x/3.x wrappers for the SMHasher library
MIT License
25 stars 12 forks source link

OS X compatibility issues #2

Closed jbenet closed 13 years ago

jbenet commented 13 years ago

hey phensley,

Thanks for making this extension!

I fixed some issues with building on os x:

  1. version float should be a string
  2. -arch flags in os x default to including ppc (universal binary).
  3. smhasher/Platform.cpp did not #ifndef APPLE for the processor affinity section. I'm not sure how they got it to compile, but it doesn't on mine. I believe OS X does not expose setting processor affinity, but not 100% sure. Perhaps worth mentioning to smhasher people, unless they use a workaround?

Cheers, Juan

ps: consider putting this in pypi!

phensley commented 13 years ago

Thanks for the commit! I've modified it and merged in some additional changes. Check out tag 0.136.1 sha 96d8b9b. Let me know if you find any issues with it.

jbenet commented 13 years ago

Looks Great! I merged it in to mine. The only change that remains in mine is thus the #ifdef in platform.cpp (now unnecessary, but i'll keep it there in case I play with smhasher directly).

Oh and some feedback: there may be some benefit in simplifying the interface to just smhasher.murmur3(str) and picking for the user if they are on a 64 bit machine or not. (the smhasher interface isn't very pythonic...) Thoughts? i can tackle this later this week if you're too busy.

Cheers, Juan