Instead of using pip as the default, set it to default. This way
each platform can choose independently what to do as the default
behavior.
This is intended as part of adding Pyodide support. Pyodide cannot
use pip as the build frontend. It always uses a modified pypa/build.
So if the build_frontend is explicitly set to pip we want to raise
an error. But if it's unset, then we should be able to tell and just
do what we want.
build_in_directory was ~140 lines long which is a bit long for my taste.
It also has a bunch of nested if statements which I don't prefer.
The first ~60 lines are computing the platform, so I factored those out
into helper methods which have clearer intent and less indentation.
* Add structually typed GenericPythonConfiguration
Use structural typing for the return value of get_python_configurations
so that we don't have to specify a union of all possible PythonConfiguration
types
* address henryiii's comments
* Use Set in more places