Add detection in python build