Unless special libraries or C flags are needed, we can auto-generate almost this whole list, which simplifies the making of new .pyx files in the standard library.
I am sure this needs rebasing WRT any new modules that have been added.
See also #15410.
CC: @williamstein @mwhansen @jasongrout @nexttime
Component: build
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/7987