I think all the Egyptian subs are being built in Germany itself. Type-209 subs have been built by several nations since the 80s- Greece, South Korea, Turkey and India come to mind.
They must be selling the bluprints and engineering data to be contract built, with various electronic systems packages available.