Context. The p-process nucleosynthesis can explain proton-rich isotopes that are heavier than iron, which are observed in the Solar System, but discrepancies still persist (e.g. for the Mo and Ru p-isotopes), and some important questions concerning the astrophysical site(s) of the p-process remain unanswered. Aims. We investigate how the p-process operates in exploding rotating massive stars that have experienced an enhanced s-process nucleosynthesis during their life through rotational mixing.Methods. With the Geneva stellar evolution code, we computed 25 M stellar models at a metallicity of Z = 10 −3 with different initial rotation velocities and rates for the still largely uncertain 17 O(α,γ) 21 Ne reaction. The nucleosynthesis calculation, followed with a network of 737 isotopes, was coupled to stellar evolution, and the p-process nucleosynthesis was calculated in post-processing during both the final evolutionary stages and spherical explosions of various energies. The explosions were modelled with a relativistic hydrodynamical code. Results. In our models, the p-nuclides are mainly synthesized during the explosion, but not much during the ultimate hydrostatic burning stages. The p-process yields mostly depend on the initial number of trans-iron seeds, which in turn depend on the initial rotation rate. We found that the impact of rotation on the p-process is comparable to the impact of rotation on the s-process. From no to fast rotation, the s-process yields of nuclides with mass number A < 140 increase by 3 − 4 dex, and so do the p-process yields. Fast rotation with a lower 17 O(α, γ) rate significantly produces s-and p-nuclides with A ≥ 140. The dependence of the p-process yields on the explosion energy is very weak. Conclusions. Our results suggest that the contribution of core-collapse supernovae from massive stars to the solar (and Galactic) pnuclei has been underestimated in the past, and more specifically, that the contribution from massive stars with sub-solar metallicities may even dominate. A more detailed study including stellar models with a wide range of masses and metallicities remains to be performed, together with a quantitative analysis that is based on the chemical evolution of the Galaxy.