flier / pyfasthash

Python Non-cryptographic Hash Library
Apache License 2.0
281 stars 52 forks source link

Fails to build on Windows #33

Closed sargunv closed 3 years ago

sargunv commented 5 years ago

(1) Start with a fresh Windows install and get Python 3.7 + build tools (2) pip install pyhash -> There's an error because PYTHON_HOME isn't set, but it's referred to here:

https://github.com/flier/pyfasthash/blob/0f9f51de7cb90956d507090c37af5c2807861085/setup.py#L37-L42

Nothing sets PYTHON_HOME by default, and I haven't seen any other packages that require it. Is there some better way to do this?

(3) okay, I set the env var manually, pip install pyhash again, now there are syntax errors: https://pastebin.com/HhNQTZAW .

https://github.com/flier/pyfasthash/blob/397e7f3fbf406813f743bfd0c655b2b7bf5e1755/src/fnv/fnv.h#L83-L85

Looks to me like the WIN32 macro isn't being set. I haven't been able to get past this point.

flier commented 5 years ago

In fact, make the build works is easy, but msvc toolchain has a lot of limitation and difference to linux/osx :(

lc11535 commented 4 years ago

I got same wrong with Sargun Vohra filer, you said easy?? FK I am not easy!