Shakespeare believes Gray, who was the subject of a £25million bid From Bournemouth recently, will then be able to settle down and concentrate on his development at City.
There has been much speculation over the future of the England under-21 international during the prolonged contract talks, which have dragged on for a while.
However, the City boss told the media on Thursday that it could soon be coming to an end.
“I’m aware that it’s closer,” he said. “It’s been ongoing for a while with his representatives and the sooner that is put to bed the better for Demarai.
“He’s been training and involved in the squad and his performance has been good.
“We’ve spoken before about Demarai being an integral part of what we’re about and what we’re trying to build. Hopefully, we can put that contract to bed.
“It’s one that we’ve hoped for and we’ve been in negotiations for a while, not just in the transfer window but before that.
“Sometimes these things can be protracted as we know but we will be delighted when it’s eventually signed.”
Exeter could be without Jordan Moore-Taylor and Lee Holmes for their third meeting of the season with Yeovil.