WASHINGTON—The charged politics around funding a wall along the southern border has both parties struggling to keep the government funded as the clock ticks toward a partial shutdown at week’s end.

With seven spending bills set to expire at 12:01 a.m. Saturday, Republicans and White House officials over the weekend discussed a two-week spending measure, aides said, which would push the fight into next year. But it wasn’t clear they would pursue that route, given that Democrats will gain more leverage when they take control of the House in January. Congressional Republicans are likely to take their cue from President Trump, who hasn’t signaled whether he would be open to a short-term extension.

Democrats, who aren’t eager to help the Republican president fulfill his signature campaign pledge in 2016, also said Mr. Trump’s boast at the White House last week that he would be “proud” to shut down the government over wall funding saddled him alone with the political blame if one occurs.

On Sunday, both sides made clear they saw little room for compromise on the wall, though that dynamic could change as the spending deadline approaches.

“President Trump should understand, there are not the votes for the wall in the House or the Senate. He is not going to get the wall in any form,” Sen. Chuck Schumer of New York, the chamber’s Democratic leader, said Sunday on NBC. “All he’s going to get, with his temper tantrum, is a shutdown. He will not get a wall.”