Move the extra-dependencies detection from setup.py to another script

Signed-off-by: Jerome Flesch <jflesch@gmail.com>