WojciechMula / pyahocorasick

Python module (C extension and plain python) implementing Aho-Corasick algorithm
BSD 3-Clause "New" or "Revised" License
952 stars 125 forks source link

Add mingw declarations #175

Closed nathaniel-daniel closed 1 year ago

nathaniel-daniel commented 2 years ago

I added a mingw declarations file to support that platform. It was copied from the cygwin definitions. I appear to be able to compile, load, and use this library from msys2 with this change. __MINGW32__ is defined for 64 bit targets as well as 32 bit. I only tested this on mingw64 through msys2, but I think this should work for the original mingw as well, though I'm not sure if people still use that.

nathaniel-daniel commented 1 year ago

Yes. The easiest method would involve installing an msys2 environment, installing the required packages, and building. I believe msys2 only works on Windows. How would you like that added to the test matrix? I assume you would want it added somehow to the "test_on_many_oses" action?

pombredanne commented 1 year ago

@nathaniel-daniel you are right, this is not entirely straightforward. I created another issue to track this in https://github.com/WojciechMula/pyahocorasick/issues/182 ... contribution would be much welcomed!

nathaniel-daniel commented 1 year ago

Thanks!