Pittsburgh will receive pitcher Joe Musgrove, third baseman Colin Moran, reliever Michael Feliz and Minor League outfielder Jason martin from the Astros.
The Yankees have once again missed out on acquiring Gerrit Cole. "We are very appreciative for what Gerrit has done for our team and organization, especially his important role on the 2013-15 playoff teams", Pirates general manger Neal Huntington said in a news release.
Cole is coming off of a career-worst ERA at 4.26 in 203 innings pitched, but he remains one of the hardest throwers in the game.
The right-hander has two more seasons before qualifying for free agency.
The Astros are adding Cole to a rotation that ranked sixth in the majors last season in ERA, WHIP, strikeout percentage and opponent batting average, according to ESPN Stats & Information.
While it won't be official until both teams perform physicals, Cole is set to join the defending World Series champions in a rotation that includes Justin Verlander and Dallas Keuchel.
This is a win for the Astros and for Cole and a clear sign the Pirates are beginning to rebuild.
He played in nine games for the Astros in 2016-and seven more last season-before suffering a freak injury when he fouled a ball off of his own face.
Martin, 22, split his season between Class A Buies Creek (46g) and Double A Corpus Christi (79g) hitting.278 (132x474) with 18 home runs and 66 RBI in 125 games. Information from ESPN was used in this report.