fix an issue where build requirements were not respected if a build script is used and `generate-setup-file` is set to true