Revamped dependency detection.  Fixed flake8 woes.

Today’s commits are brought to you by python-pyside.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>