Fix setup.py using the inspect module instead of single metadata files

This also reverts commit 1847e9ca4484c185f307aa4b55a661378ff88f2a.