On 14. 06. 21 20:28, Ben Beasley wrote:
On Mon, Jun 14, 2021, at 2:07 PM, Miro Hrončok wrote:
On 14. 06. 21 19:35, Benjamin Beasley wrote:
However I think we should at least strictly require a smoke test (such as
%python3 -c "import foo, foo.bar") in such cases, for reasons described below...
[…]
It’s also not clear to me why the Python guidelines should be so much stricter than the overall Fedora guidelines (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_test_suites) in this area.
As written elsewhere in this thread, because we regularly got bitten by pure
Python packages without tests.
[…]
I tentatively agree with the idea of requiring an “import foo.bar” smoke test in cases where the upstream tests cannot be used, especially since pyproject-rpm-macros with %pyproject_buildrequires makes it much easier to add runtime dependencies as BR’s. (It may not always be practical to explicitly import all subpackages/modules in a complicated package, but even importing the top-level package is a good start). It would catch a large portion of the FTI bugs that appear in practice.
We could very well add a macro helper that imports modules from the
%{buildroot} and:
- when given positional arguments, import the given names
- when no arguments given, imports all modules saved by %pyproject_save_files
The NodeJS packaging guidelines have a similar requirement (https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_build_testing_in_check).
Awesome requirement. Will discuss this with Petr.
Even just mandating that the runtime requirements must be BR’s (%pyproject_buildrequires -r or “better”) would catch most such issues at build time. I did this in pipx for exactly that reason.
Recently I was considering if -r shouldn't be the default (with -R or similar
for opt-out). That should catch most of the fails to install issues.
--
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