If you have a trolley, @Witan-ap-Danu advice (in comments) is the best so far : you could "pull" your cart rather than push it. Now the cart is behind you and gives an automatic buffer zone.
Even if you have only a couple of items, grab a smaller trolley (the one you can either carry or roll, with expandable handle) when you get into the supermarket, and use it the same way.
Step 2 (untold / body language)
Then, waiting inline, you can use the "next customer bar" and put it far behind your goods (like 1 meter, so it becomes obvious for most people). This way, the next customer has to step back to put her/his items on the automated conveyor.
NOTE: Don't turn your back if not needed. FACE the person while putting the items on the conveyor, as people are more willing to step back when in front of someone.
Step 3 (untold / told / polite)
Go back to the small shelf in front on the line, usually the one that split lanes between cashier, and get an unexpensive small stuff, like some chewing-gum or a magazine. Excuse me, I forgot this…. Then, this rude one with proxemics problems will have to step back. Because, YES, they're being rude!
If needed, put it back on the shelf, so she/he has to move back again.
Now, words… Would you please step back a little, and allow me more room?
Well, it's time to be not that polite if you feel like it's needed…
Sometimes, people need to be told how rude they are, and you draw the line…