A higher weight generalization of the Hermite-Minkowski theorem