Miro Hrončok <mhroncok@xxxxxxxxxx> writes: > On 28. 06. 21 22:25, Dan Čermák wrote: >> Hi Miro, >> >> Miro Hrončok <mhroncok@xxxxxxxxxx> writes: >> >>> Hello Python RPM packagers, >>> >>> based on some discussion in the "F35 Change: Python Packaging Guidelines >>> overhaul (System-Wide Change proposal)" thread [0], I've drafted a macro that >>> can help to test-import a Python module in %check when no other tests exist or >>> are when they cannot be executed during build [1]. >>> >>> The semantics is quite simple: >>> >>> >>> %check >>> %py3_check_import mymodule mymodule.submodule >>> >>> ... >> >> This looks pretty good imho. Would it somehow be possible for the macro >> to automatically try to import the module name from the generated >> python3.Ydist() provides? That would make the macro even more convenient >> to use and reduce any potential user error further. > > Honestly, I'd rather not do that. People already confuse "module names" (that's > what you import) with "Python package names" (that's what you install from PyPI > or what's provided as python3.Ydist()). And while this would make the macro > slightly easier to use for the optimal case when those names are identical, it > would only create more confusion when they are not. > > In the future, we could extend it to automatically import modules found in the > %buidlroot, but now I'd rather provide a simple tool where the packager needs > to be explicit, than a very complex tool that does heuristics. That makes sense & is probably the better approach initially. I have honestly no idea what could be improved here, so this looks more than fine by me :) Cheers, Dan _______________________________________________ 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