Given a smooth manifold $M$ I want to give explicit constructions of principal $U(1)$-bundles given a cohomology class in $H^1(X;U(1))$. I know of two ways to compute this group:
(1) Using cech cohomology
(2) Using the long exact sequence from $$ 0 \to \mathbb{Z} \to \mathbb{R} \to \mathbb{R}/\mathbb{Z} \to 1 $$
The main example space I have in mind is the 2-torus.
The ansatz you are writing out needs a bit of interpretation. The description of principal $U(1)$-bundles in terms of Cech cohomology is based on the sheaf of continuous functions from $X$ to $U(1)$. So the cohomology in question is sheaf cohomology with coefficients in that sheaf. Correspondingly, the long exact sequence that you are writing out has to be interpreted as the sequence $0\to C(\_,\mathbb Z)\to C(\_,\mathbb R)\to C(\_,U(1))\to 1$, induced by the short exact sequence of groups in your question. Now for $\mathbb Z$ continuous functions are the same thing as locally constant functions, so the sheaf cohomology with coefficients in $C(\_,\mathbb Z)$ coincides with singular cohomology with integral coefficients. On the other hand, $C(\_,\mathbb R)$ is a fine sheaf and thus has trivial cohomology in all positive degrees. Using this, the long exact sequence in sheaf cohomology shows that the connecting homomorphism $H^1(X,C(\_,U(1)))\to H^2(X,\mathbb Z)$ is an isomorphism.
Now I am not completely sure what your question is from there on. Basically the connecting homomorphism maps a principal $U(1)$-bundle to its first Chern class. Moreover, the first Chern class of a tensor product of line bundles is the sum of the first Chern classes of the factors, so this can be translated to principal $U(1)$-bundles. In the case of the two-torus $H^2(X,\mathbb Z)\cong\mathbb Z$ so you mainly need a principal $U(1)$-bundle with first Chern class equal to $1$, from which you get all others via the conjugate and tensor powers.