How to wire light with a switch in the middle of a circuit
It depends on which side of the switch is the line (power source from the box) and which side is the load (light and outlets).

If the two wire cable is the line and the three wire is the load, you may be able to use the red wire to carry uninterupted power to the outlets. The next question is whether the light or the outlets come next in the circuit, and whether that red wire shows up in their respective boxes.

If the outlet is next and the red wire is also capped in that box, you can use the red to power the outlets while still switching the light. Connect the incoming black line wire, the exiting red wire and add a black pigtail (a short length of wire). Then connect the other end of the pigtail to the switch where the incoming black wire was previousl. 

At the outlet box, remove the incoming black wire going to the outlet and replace it with the incoming red wire. Attach the incoming black wire (that is now free) to the black wire going to the light. This may be attached to the far side of the outlet. If so, disconnect it from the outlet first.

If the light is next in line, this will only work if there are both black and red red wires going to the light fixture box. In that case, remove the outgoing black wire (going from the light to the distant outlets) and attach that outgoing black to the incoming red. Leave the incoming black on the light fixture.

If the red wire does not show up in the next connection box, you are out of luck unless you add additional wiring.

In sum, you need two hot wires leaving the switch box, a black one that is switched and a red one that is always hot. You are trying to keep the switched black connected to the light fixture and the unswitched red powering the outlet. (The colors are arbitrary, but since the red is not currently in use, we have designated it always hot).