Swallowtail pupae have evolved to be upright...and tail hanging species have evolved to tail hang! With Swallowtail pupae you'll notice that the legs on the pupae always point inwards towards the stick or whatever it pupated on.
This enables the emerging butterfly to grasp with it's legs immediately it breaks free and pull itself clear of the pupal case. While many Swallowtail pupae will emerge when hanging upside down with no problems, the amount of cripples will increase over natural upright conditions...so I always stick them (leg side inwards) from the base on some rough cardboard. I use a contact glue..I dot a little on the cardboard and a little on the end and first couple of pupal segments. You have to let it dry for 5 mins and then I just place them into position to sit naturally.
(From a separate post on Sulphurs...) I remove the strings each side of the pupae with a scalpel...the pupa drops and hangs from it's cremaster. I then use a needle that has been pushed blunt end into a pencil rubber/ eraser...with this I "Worry" the silk at the cremaster until the pupa drop into a lid lined with some kitchen roll paper, which I hold right underneath it. I then use tweezers that are bent wide and at the "teeth" ends, where I have stuck some foam rubber strips to handle them...so I really don't have to touch them with my hands. I then stick them into place as the Swallowtails. This may sound time consuming but you don't lose any and they take time to deal with in any other way anyway!