It was less than six months before the 2016 election and Donald Trump was aboard his private jet, en route to a campaign rally in Albuquerque, NM — but politics were the farthest thing on his mind.

In front of him on a table were the scattered contents of three large banker boxes stuffed with papers and files.

“Trump looked at them the way I look at a big plate of pasta around dinnertime,” recalled Anthony Scaramucci, Trump’s short-lived White House communications director, in his new book, “Trump: The Blue-Collar President,” out Tuesday.

Scaramucci, who had joined Trump’s Finance Committee, was worried — there were only three hours to go before his boss’s speech.

“What in the world are you doing?” Scaramucci demanded.

Trump looked up: “Elevator-equipment contracts. For these new condominiums,” he said.

Besides, Trump insisted, he was already prepared, producing a single page of three, handwritten bullet points as the proof.

Before he got off the plane, he smiled at Scaramucci. “Do you think Hillary’s doing this?” he asked. “Running a business from her campaign plane?”

In the book, Scaramucci admits that he never expected Trump to win the presidency, let alone work for the real estate mogul-turned-politician.

In one chapter, he recaps the day Trump announced he was running for president, descending down the gilded escalator of Trump Tower with Melania.

“It looked, on television at least, like the atrium was packed with adoring fans,” wrote Scaramucci. “I would learn later from a few friends on the campaign that all of that was smoke and mirrors. There wasn’t a big crowd at all. They had given building workers Make America Great Again T‑shirts and had them line the balcony so the place would look full.”

Scaramucci didn’t have it easy once he followed Trump to Washington, D.C.

He writes that Steve Bannon, Trump’s then-chief strategist, threatened the former hedge funder when he learned of his White House communications director appointment on July 21, 2017.

“You have zero chance of being the White House communications director,” Bannon said to Scaramucci on the phone. “Zero.”

But Scaramucci made it to the office and Trump made it clear he was to report directly to the president and find and fire the leakers.

To drive home his point, Trump held a meeting at the Oval Office with Scaramucci, chief of staff Reince Priebus and Bannon.

“You two are the biggest leakers I know,” he said, looking at Priebus and Bannon.

“I don’t want any of your taint on Anthony.” (Priebus’ resignation was announced on July 28.)

But it was Scaramucci’s explosive interview with the New Yorker’s Ryan Lizza, published online on July 27, in which he referred to Bannon “s–king his own c–k” and called Reince “a f–king paranoid schizophrenic, a paranoiac,” that would be his undoing.

Ten days after becoming communications director, Scaramucci’s White House phone was deactivated.

On July 31, the morning John Kelly was sworn in as the new chief of staff, Kelly called Scaramucci into his office.

“He told me that he didn’t think I would ever be able to get past the phone call with Ryan Lizza,” wrote Scaramucci. “‘Not in this town,’ he said.

I remember thinking that we had gotten past the Access Hollywood tape, but I didn’t say that to him.”