The ebuild is missing python_check_deps() function entirely. Furthermore, it is using two incompatible python_gen_any_dep() calls. python_gen_any_dep must be called exactly once for a given USE flag combination.
Plus, it's also implicitly depending on SCons which makes it even a greater horror of a package.
Here's how to fix it: https://dev.gentoo.org/~mgorny/python-guide/buildsys.html#build-time-use-with-extra-dependencies Note that I've stripped stuff irrelevant to the example, so you can't copy-paste it all.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69d122bf7831a2fb0918eb0dba968012962f524d commit 69d122bf7831a2fb0918eb0dba968012962f524d Author: Tomáš Mózes <hydrapolic@gmail.com> AuthorDate: 2020-03-21 21:09:48 +0000 Commit: Alexys Jacob <ultrabug@gentoo.org> CommitDate: 2020-03-22 10:56:39 +0000 dev-db/mongodb: improve python dependency checks Closes: https://bugs.gentoo.org/708564 Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/15046 Signed-off-by: Alexys Jacob <ultrabug@gentoo.org> dev-db/mongodb/mongodb-4.0.16-r1.ebuild | 173 +++++++++++++++++++++++++++++++ dev-db/mongodb/mongodb-4.2.3-r1.ebuild | 176 ++++++++++++++++++++++++++++++++ 2 files changed, 349 insertions(+)
Thanks @mgorny for improving mongodb in Gentoo.