Holomorphic bundles over Riemann surfaces and the Kadomtsev—Petviashvili equation. I