script/setup and script/setup.bat implemented the same workflow and were
kept in sync by hand, which had already drifted: the worktree hook fix in
#18843 landed in the bash script only. Both are now thin wrappers around
script/setup.py, so there is one implementation to maintain.
The post-checkout hook also checks for a venv/Scripts layout before doing
anything, so a branch switch on Windows can no longer clear a working
virtual environment.