We consider supersymmetric field theories on compact manifolds $ \mathcal{M} $ and obtain constraints on the parameter dependence of their partition functions $ {Z_{\mathcal{M}}} $ . Our primary focus is the dependence of $ {Z_{\mathcal{M}}} $ on the geometry of $ \mathcal{M} $ , as well as background gauge fields that couple to continuous flavor symmetries. For $ \mathcal{N} $ = 1 theories with a U(1) R symmetry in four dimensions, $ \mathcal{M} $ must be a complex manifold with a Hermitian metric. We find that $ {Z_{\mathcal{M}}} $ is independent of the metric and depends holomorphically on the complex structure moduli. Background gauge fields define holomorphic vector bundles over $ \mathcal{M} $ and $ {Z_{\mathcal{M}}} $ is a holomorphic function of the corresponding bundle moduli. We also carry out a parallel analysis for three-dimensional $ \mathcal{N} $ = 2 theories with a U(1) R symmetry, where the necessary geometric structure on $ \mathcal{M} $ is a transversely holomorphic foliation (THF) with a transversely Hermitian metric. Again, we find that $ {Z_{\mathcal{M}}} $ is independent of the metric and depends holomorphically on the moduli of the THF. We discuss several applications, including manifolds diffeomorphic to S 3 × S 1 or S 2 × S 1, which are related to supersymmetric indices, and manifolds diffeomorphic to S 3 (squashed spheres). In examples where $ {Z_{\mathcal{M}}} $ has been calculated explicitly, our results explain many of its observed properties.