We use localization techniques to calculate the Euclidean partition functions for N=1 theories on four-dimensional manifolds M of the form S1×M3, where M3 is a circle bundle over a Riemann surface. These are generalizations of the N=1 indices in four-dimensions including the lens space index. We show that these generalized indices are holomorphic functions of the complex structure moduli on M. We exhibit the deformation by background flat connections.