From 96f9381a16e0406fb1396627c61287050af13ef7 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Jul 08 2021 16:54:00 +0000 Subject: Document %py3_check_import --- diff --git a/guidelines/modules/ROOT/pages/Python.adoc b/guidelines/modules/ROOT/pages/Python.adoc index ebc239e..0e9dcd9 100644 --- a/guidelines/modules/ROOT/pages/Python.adoc +++ b/guidelines/modules/ROOT/pages/Python.adoc @@ -378,6 +378,10 @@ The following macros are defined for you in all supported Fedora and EPEL releas |`+PATH=… PYTHONPATH=… … %{__pytest}+` |Various environment variables are set to ensure the packaged version is tested. Use this macro instead of direct `pytest` calls in `+%check+`. Pass additional argument as if passed to `pytest`, e.g. `+%pytest -m "not network"+` to deselect tests marked as `network`. +|`+%py3_check_import …+` +|`+PATH=… PYTHONPATH=… … %{__python3} -c 'import …'+` +|Various environment variables are set to ensure the packaged version is tested. Use this macro in `+%check+` to test public Python modules are importable if running upstream tests suite is not feasible. Pass module names as positional arguments separated by spaces or commas. + |`+%{py_dist_name}+` |(Lua script) |Given a standardized name (i.e. dist name, name on PyPI) of Python software, it will convert it to a canonical format. See <> for more information.