Backport bootstrap.py