On 24. 03. 22 13:19, Ben Beasley wrote:
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.

Better than *just* mv'ing the file in %install (which probably indeed fixes the problem), suggest the change to upstream please.

I.e. replace this:

https://github.com/rogerbinns/apsw/blob/3.38.1-r1/setup.py#L851

With something like this:

https://github.com/sqlalchemy/alembic/blob/rel_1_7_7/setup.cfg#L58
https://github.com/pytest-dev/py/blob/1.11.0/setup.py#L42


--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to