sphinx: handle versions better