Re: RPM build: unpackaged file .pyi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux