Python config detection enhancement required by the Samba project