Explicit calculation of the partition function of a one-dimensional δ-function bose gas