embray / gappy

Python interface to GAP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build and test on MacOS and Cygwin

embray opened this issue · comments

These platforms at a minimum should be supported for Sage; possibly others.

As most of this code was extracted originally from Sage, and as it does not add much new in the way of platform-specific code, this shouldn't require much work.

The biggest change that needs some scrutiny is the use of the non-POSIX dlinfo() for finding the path to the libgap SO. I don't know if this is available on platforms other than Linux, and if not it will need to be disabled for those platforms.

For MacOS this suggests a way to do it with dlsym() and dladdr(). I don't think the first_external_symbol_for_image mucking about is strictly necessary, since we can just use a known external symbol, like "GAP_Initialize".

Cygwin doesn't have dlinfo() either, but it looks like the dlsym() + dladdr() combo should work there too. Maybe I can just do that on Linux as well and not use dlinfo().

Added CI for MacOS in d094933. Adding it for Cygwin will take quite some extra work, especially since GAP isn't available for conda on Windows (creating Cygwin packages for conda is on my todo list but a far way's off). However, I've confirmed manually that it's working on Cygwin. Other than the DLL loading stuff, very little of this code is very platform-dependent, so I'm fine keeping occasional Cygwin testing manual for now.