Update build_component.py

modify some code