Re: autodoc-build (such as sphinx) vs rpm sections
Miro Hrončok <[email protected]>
| Newsgroups | gmane.linux.redhat.fedora.devel |
|---|---|
| Message-ID | <[email protected]> |
On 23. 06. 26 18:04, Michael J Gruber wrote: > Michael J Gruber venit, vidit, dixit 2026-06-18 15:46:42: >> Am Do., 18. Juni 2026 um 15:20 Uhr schrieb Miro Hrončok <[email protected]>: >>> >>> On 18. 06. 26 15:00, Michael J Gruber wrote: >>>> Hi there >>>> >>>> Even after reading our packaging doc I'm wondering what's the proper >>>> way to handle sphinx doc autogenerated from built sources. >>>> >>>> The issue is that %build is the section where all building should be >>>> done, followed by %install and %check. Building the documentation >>>> (e.g. using sphinx autodoc) is clearly a build step, but often >>>> requires the build products, and often *installed* build products. >>>> >>>> [I came across an upstream which even calls "pip install" from >>>> sphinx's docs/conf.py ... ] >>>> >>>> So, what do you guys do? Build docs in %install and point py/sphinx to >>>> the installed sources? Build docs after the wheel and point py to >>>> %{pyproject_whichone_please}? I somehow cannot find a solution without >>>> failed imports being reported by sphinx. >>> >>> I usually try to do PYTHONPATH=%{buildroot}%{_pyproject_wheeldir}/...whl -- it >>> should work. If we need to make %{_pyproject_wheeldir} a public macro, we can. >> >> Cool, I didn't know that one can put a wheel on PYTHONPATH. Works! >> [FTR: %{_pyproject_wheeldir} contains %{buildroot} already.] >> >> I'm still wondering how "bad" (policy, side-effects) building doc in >> %install would be, but I don't need to in this case any more. >> > > Update: Works as reported for pure python wheels. Oh, I forgot to mention that. Pure Python only. And packages that access data files on runtime by direct file access rather than importlib.resourecs also tend to blow up. -- Miro Hrončok -- Phone: +420777974800 -- _______________________________________________ devel mailing list -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new