Only the oldest version of dev-python/pyx supports py2.7, while scapy supposedly supports py2.7 only. Please check whether this package can be made to work with python3.
I asked upstream and latest version should work with any pyx version https://github.com/secdev/scapy/issues/657#issuecomment-581129886
I think this became obsolete at least in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8435230fb40a2f6cd10dc4c7523fd730cb421aa8.