Python might not be up-to-date, so use opt_prefix

Fixes #24456.
Import CVS from dupes
Implement inferred CVS dependency