Instead of a blank bool doctest_ignore_import_errors option, add that takes a string value for list of files/modules where imports should be ignored. E.g. that should be used to skip import issues for e.g. setup_package.py files, etc.
With this the plugins behaviour could match the pytest native doctest more, while we can keep some of the flexibility we needed for extension_helpers/astropy_helpers.