Supersymmetric pure Yang-Mills theory is formulated with a local, i.e. space-time dependent, complex coupling in superspace. Super-Yang-Mills theories with local coupling have an anomaly, which has been first investigated in the Wess-Zumino gauge and there identified as an anomaly of supersymmetry. In a manifest supersymmetric formulation the anomaly appears in two other identities: The first one describes the non-renormalization of the topological term, the second relates the renormalization of the gauge coupling to the renormalization of the complex supercoupling. Only one of the two identities can be maintained in perturbation theory. We discuss the two versions and derive the respective β function of the local supercoupling, which is nonholomorphic in the first version, but directly related to the coupling renormalization, and holomorphic in the second version, but has a non-trivial, i.e. anomalous, relation to the β function of the gauge