I build samba with --bundled-libraries=heimdal,!zlib,!popt,!talloc,!tevent,!tdb,!ldb Samba 4.9.4 did built only /usr/lib64/python2.7/site-packages/samba/*, but samba 4.10.0 also builds /usr/lib64/python2.7/site-packages/{tdb.so,_tdb_text.py,_tevent.so,tevent.py}, which are in python-tdb package As bundling tdb is switched off, it must not be built.
Samba 4.10.0 is built with PYTHON=python2
This is a different bundled lib, pytdb. You need to specify that also.