I think the easiest thing to try is to wrap the hyp2f1 function into theano with as_op decorator outside of your distribution class. You can see an example on the theano website.
Also, in your logp function you should compute the sum at the end otherwise it will return a vector.