Restore pyroma test for iOS by freakboy3742 · Pull Request #9116 · python-pillow/Pillow
The existence of _path is used to drive a check-manifest call. pyroma is resilient to the key not existing.
In the context of reading installed package metadata, you don't have access to the source tree (including version control data) which is necessary for a check-manifest call to succeed.
I'm not convinced that a check-manifest call is adding much in this context, and it can't ever work on iOS (or, looking forward, Android) because we won't have access to the original source directory and VCS metadata. So, adding _path (or an analog) isn't really necessary.
But, if you think it's worth preserving where possible, then we could make the get_data() step conditional on the test platform - on platforms that support subprocesses, we use the full get_data() call; when subprocess isn't available, we use the installed metadata approach (and implicitly skip the check-manifest check). That check becomes a cleaner if/when regebro/pyroma#116 is available in a release.