bpo-36146: Refactor setup.py by vstinner · Pull Request #12068 · python/cpython (original) (raw)

The detect_modules() method of setup.py became longer and longer over
the years. It is now 1128 lines long. It's way too long: it becomes
very hard to track the lifetime of a variable and many variables are
overriden on purpose or not. Shorter functions help to track the
lifetime of variables, ease review and reduce the number of bugs.

Changes:

Other refactoring changes:

https://bugs.python.org/issue36146