Closed mgorny closed 5 months ago
Am I missing why this can't just be a pre inherit variable?
Because we don't want another mess like cargo.eclass
where you have to scroll a hundred lines down to the inherit
line.
That doesn't feel like great rationale for a hand-rolled check in pkgcheck when we already have infrastructure for that?
Besides, I at least find it better to put all variables which might affect metadata before inherit (it's where I expect them).
Actually, there are valid cases not to set it prior to the call, particularly if we're using PYTHON_TESTED
.
Is there an existing such new check request for this?
Explain
Check for
EPYTEST_XDIST
being declared afterdistutils_enable_tests pytest
call. This way, we ensure thatdev-python/pytest-xdist
dep will be added by the call.Examples
Output message
EPYTEST_XDIST needs to be declared prior to calling distutils_enable_tests
Documentation
EPYTEST_XDIST
variable is used both byepytest
anddistutils_enable_tests
. It needs to be declared prior to the call to the latter function, in order to ensure that it adds the dependency ondev-python/pytest-xdist
. Otherwise, xdist would be used but the dependency would be missing.Result level
warning