thierry-martinez / pyml

OCaml bindings for Python
BSD 2-Clause "Simplified" License
187 stars 31 forks source link

Generalize Unix OS support #57

Closed pinotree closed 3 years ago

pinotree commented 4 years ago

Requiring a different pyml_arch_<os>.ml for every OS makes supporting more OSes complex, as it requires doing copy&paste of a mostly similar template at least for Unix OSes.

Change the approach to something more taylored towards special cases: first check for specific OS implementations, and then add a generic unix OS implementation (former linux/freebsd impl) as fallback case. This way:

The test suite should be enough to check whether an OS implementation is working or not.

thierry-martinez commented 3 years ago

Sorry for the too long wait and thank you very much for your contribution! Merged.