Drew Barrymore and ex Justin Long back together -- for a movie.

The two -- who were spotted this weekend at the Farmers Market in Hollywood -- have both signed on to headline the romantic comedy Going the Distance, according to Variety.

They'll play "a young couple navigating their way through the perils of a long distance relationship who quickly discover that 'going the distance' might cost them everything they have, including one another," reports Variety.

See all the men Drew has dated

The two, who split in July 2008, recently teamed up for the comedy He's Just Not That Into You.

See 20 pics from He's Just Not That Into You

Long has said it isn't awkward working with his ex.

See the celebs who can't get enough of their exes

"We're friends," he told Ellen DeGeneres. "She's the best... She has this amazing ability to make anyone feel like at ease."