looks like things have been this way since at least python-2.5.x, and is the same in python-3.3.x. so let's just say "forever". here's the 3.3.0 log snippet: checking bluetooth.h usability... no checking bluetooth.h presence... no checking for bluetooth.h... no checking bluetooth/bluetooth.h usability... no checking bluetooth/bluetooth.h presence... no checking for bluetooth/bluetooth.h... no and if we look at the source, we see Modules/socketmodule.c will conditionally include bluetooth socket support when those headers are found so i guess we should have USE=bluetooth control these headers and have it pull in net-wireless/bluez as a DEPEND (no RDEPEND needed)
We need to check PyPy & Jython then as well.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25c63c15103dd42edb4f370dc308f5f5aee62bfd commit 25c63c15103dd42edb4f370dc308f5f5aee62bfd Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2018-04-21 21:38:44 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-04-21 21:39:38 +0000 dev-lang/python: Fix automagic dep on bluetooth headers Add IUSE=bluetooth to control the support for AF_BLUETOOTH. When enabled, pull net-wireless/bluez to provide headers necessary to build it. When disabled, explicitly make the configure test for appropriate headers fail for consistency. Closes: https://bugs.gentoo.org/479576 dev-lang/python/metadata.xml | 1 + dev-lang/python/python-2.7.14-r2.ebuild | 369 ++++++++++++++++++++++++++++++++ dev-lang/python/python-3.4.8-r1.ebuild | 363 +++++++++++++++++++++++++++++++ dev-lang/python/python-3.5.5-r1.ebuild | 368 +++++++++++++++++++++++++++++++ dev-lang/python/python-3.6.5-r1.ebuild | 350 ++++++++++++++++++++++++++++++ 5 files changed, 1451 insertions(+)