Revert "propagating flags in distutils"

This reverts commit 8a1434d39023daa43836a833b375322d279832bc.
Restored useful pieces of 8a1434

(full commit): 8a1434d39023daa43836a833b375322d279832bc

Note: 8a1434 broke Python builds by overriding flags instead of
appending to them.