I've recently fitted Mini Spares' non-genuine mechanical fuel pump to my 998 A+ and found that the outlet came incredibly close to one of the branches of the exhaust manifold. I've found that it's possible to change the orientation of the inlet and the outlet fairly easily.
This is the problem I was having.
This is the pump we're dealing with.
And here it is on Mini Spares, https://www.minispar.../AZX1818MS.aspx.
You can use some pieces of wood (or soft jaws) in the vice to hold on to the pump. Be gentle, the pump body is only small. Remove the bolt securing the top with a 10mm socket. You'll need a socket with quite a thin wall. I found a 1/4" drive socket fits nicely.
When you withdraw the top you'll find a rubber sealing ring and a filter underneath the ring. Take these out and place them on a clean surface to one side.
With that removed, you'll be left with the valve housing.
Use a No. 2 PoziDriv screwdriver to release the valve housing from the main body of the pump.
With a bit of gentle persuasion the valve housing will now come away from the pump body. I had to gently pry them apart. Don't pry on any sealing surfaces or you might cause the pump to leak.
Orientate your outlet how you want it. You've got 5 choices due to the bolt pattern. I chose to have mine point directly away from the exhaust manifold. Replace the screws you removed and tighten them down evenly. I put mine in with my fingers until they made contact with the valve housing and then turned them 1/4 turn each, tightening them in a star pattern until I was satisfied they were tight enough.
Replace the filter, rubber sealing ring in the order they came out (rubber ring goes in last).
Place the top on in the orientation you want and re-install the bolt. I tightened it firmly. Just remember the housing is only aluminium and if you strip the threads you'll need a new pump.
Once fitted back to the car.
Both inlet and outlet now on the same side of the pump which I'm happy with. It's probably easy enough to re-orientate the inlet with the pump on the engine. The outlet might be a struggle though.
Hopefully that will help others avoid having their fuel lines run frighteningly close to their exhaust manifolds.