Ten-dimensional supergravity constraints from the pure spinor formalism for the superstring