I've been watching this story develop and I have sympathy for Turkey. They have been in negotiations for almost 20 years to acquire Patriot systems and have got nowhere from the US. They have started to look at co-production and technology transfer of the S-400 and subject to financing, Turkey will buy several systems before producing them for internal use and for export. But it's not a done deal. Technology transfer needs to be agreed and there is the issue of funding...
Meanwhile on 14 July, at the French Embassy reception, the (now previous) Turkish Defence Minister announced a contract with EUROSAM to co-develop and new A2AD system with Italian and French companies, for a system that (might) roll out in the late 2020s.
There is no evidence of Turkey turning their back on NATO (in spite of some fairly sensationalist press reporting) and their navy is currently working with the RN in the Mediterranean and their air force is gradually being rebuilt after the wholesale sacking of pilots implicated in the coup plot in July last year.