fix build breaker on non-Windows platforms
adapt Python section for MacOS