Inhomogeneous superconductivity induced in a weak ferromagnet