I'm sure someone makes a tool for this, but I've always just used a jack and a lot of shims.
Extend the spring using a jack. I hook one end of the spring around the axle of my floor jack, and the other around the lifting part.
Once it is extended (larger than you need it) insert shims between the coils of the spring.
Once you have inserted enough shims (I try to get one between each coil), slowly back off the jack. The spring should then rest on the shims and stay extended.
Install one end of the hinge on the car, you should be able to put the other end in position, but it will not stay because the spring is still extended. You may need to break off one end of the shims depending on how they were oriented and how long they are.
Remove the shims one at a time. I find it is is best to remove a shim from each end and work towards the middle. As the shims are removed the spring will contract, eventually hooking into position. You can move the hood up and down to change when the spring hooks in.
Finish removing the shims, the fewer you have the more difficult this becomes. You can move the hood up and down to force the spring to extend, when you have just a few left you should be able to just close the hood and the last few shims will drop out onto the floor.