The latest klayout (0.27) does build and run on Mac OS. Their maintainers' documentation has specific details for Mac OS, but it's in multiple places in the git repository. The ReadMe.md in the macbuild directory is the detailed guide. For my build, I installed the MacPorts qt5, ruby27 and python38 libraries.
This corresponds to the "Use Case 6B" in the readme file. The instructions there show which options and flags to use with their python build script. This resulted in a successful app bundle build.
For other tool builds for Mac, like Magic, be advised that the Apple system "sed" executable can cause build problems, probably because it's either non-standard, or a very out-of-date version (thanks to Tim Edwards for finding this). It's a good idea to install "gsed" from MacPorts, for compatibility with some build scripts.