’t Hooft anomalies and the holomorphy of supersymmetric partition functions