Preheat your oven to 200°C (400°F) and line a baking sheet with parchment paper.
Cut the pumpkin in half and remove the seeds. Peel if needed, then cut the pumpkin into evenly sized wedges.
Place the pumpkin pieces in a large bowl. Drizzle with olive oil, add salt and pepper, and toss well so all pieces are evenly coated. Strip the leaves from the rosemary sprig, roughly chop them, and add them to the bowl.
Spread the pumpkin pieces in a single layer on the prepared baking sheet. Make sure they are not crowded so they roast evenly.
Roast in the oven for 25–35 minutes, turning once halfway through, until the pumpkin is tender and lightly golden around the edges.
Remove from the oven and serve warm. Roasted pumpkin is perfect as a side dish or added to salads, grain bowls, pasta, or soups.