This is a “stub file” for type checking. It looks like upstream is trying to follow https://peps.python.org/pep-0484 rather than the later https://peps.python.org/pep-0561/. However, the way they are installing the stub file with data_files in setup.py is resulting in it getting dumped in %_prefix.
I think that installing the .pyi file alongside the compiled extension, i.e.:
%install
%py3_install
mv %{buildroot}%{_prefix}/apsw.pyi %{buildroot}%{python3_sitearch}
…should achieve the desired effect of making the stubs available to type checkers.
Most upstreams that provide type stubs do so via package_data, so
they are installed inside the Python package without any
particular effort on the RPM packager’s part. That’s probably why
nothing has been written about them in the guidelines.
Hello there,
After bumping upstream version in "python-apsw", I have noticed that a new Python .pyi file was created in the new version, so the package build process started to fail:error: Installed (but unpackaged) file(s) found: /usr/apsw.pyi
I haven't found related details in https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/Could you suggest, should I skip and remove .pyi files during RPM packaging?
Thanks!
--
wbr, Denis.
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure