Is there an existing such new check request for this?
[X] I have searched the existing issues
Explain
We should detect that the distutils_enable_sphinx and distutils_enable_tests are called in the correct location, that is:
That BDEPEND, IUSE, RESTRICT aren't overrode after the call (but it's fine to += them).
That they are called prior to declaring phase functions (possibly any functions?).
Examples
gentoo/gentoo@94f4934e4e1aa7acac42c5d20a52059238188b5c is a typical case of fixing the wrong order.
gentoo/gentoo@9bc48944ad202091517bb578b8f03447087bd302 has distutils_enable_tests after phase function, along with EPYTEST_DESELECT that's so huge that I didn't even notice src_prepare() there at all.
Output message
should be called after declaring // should be called prior to declaring ebuild functions
### Documentation
`distutils_enable_sphinx` and `distutils_enable_tests` variables modify ebuild metadata and declare sub-phase functions. They should be called after assigning metadata variables (such as `BDEPEND`) to prevent their results from being overwritten; it is valid to append to these variables after the call, though. They should be called before defining ebuild functions (such as `python_test`), as otherwise they could overwrite them.
### Result level
warning
Is there an existing such new check request for this?
Explain
We should detect that the
distutils_enable_sphinx
anddistutils_enable_tests
are called in the correct location, that is:BDEPEND
,IUSE
,RESTRICT
aren't overrode after the call (but it's fine to+=
them).Examples
gentoo/gentoo@94f4934e4e1aa7acac42c5d20a52059238188b5c is a typical case of fixing the wrong order.
gentoo/gentoo@9bc48944ad202091517bb578b8f03447087bd302 has
distutils_enable_tests
after phase function, along withEPYTEST_DESELECT
that's so huge that I didn't even noticesrc_prepare()
there at all.Output message