Homebrew doesn't provide a merged (FHS) prefix and tools installed from
it cannot be expected to appear on PATH. Furthermore, XCode provides
some tools and headers (Flex, Bison) which must not be used if
a Homebrew alternative is installed.
Also skip calling `tail` on stubnets log outputs.
Fix auxprog prefixes
i.e. if we've set `YOSYS_PROGRAM_PREFIX=why`, we shouldn't be trying to call `build/yosys` when building docs (because if we've done a clean build it doesn't exist).
I suspect this also affects tests, but I was working on docs when I noticed it.
This commit reimplements the (no longer recommended) setuptools based
build system using a standards-based in-tree PEP517 build backend.
The implementation is partially based on
https://codeberg.org/ziglang/zig-pypi/src/branch/main/make_wheels.py
which is licensed under BSD-0-clause.
It also adds a new option `YOSYS_BUILD_PYTHON_ONLY` that is available
only if the binary or the library aren't going to be installed, which
turns off these targets entirely, as well as some dependent ones
(e.g. tests).
Co-authored-by: Mohamed Gaber <me@donn.website>