more specifically this is for the U-Bolt type bike locks.
the cable ones, you can usually just wrap around the seatpost,
but the U-bolt are a little more difficult to carry around while your biking.
this can be built for around $3.50 (less if you already have some of the parts) and take about 10 minutes.
Step 1: Materials and Tools
-one foot section of PVC (for my lock i used 1 1/4" pipe, but it may ne different for your lock)
-2 hose clamps
-3/4" drill bit
-clamp (not required, but helpful)