Nontrivial examples of non-trivial principal circle bundles It is a well known fact that (isomorphism classes of) principal $S^1$-bundles over a base space $B$ are classified by $B$'s second integral cohomology, $H^2(B;\mathbb{Z})$.
There is always the trivial one $B\times S^1$, and for $B=S^3$ for example, these are all. The Hopf bundle is an interesting example when $B=S^2$. The principal bundles over $S^2$ correspond bijectively to $\mathbb{Z}$; much interesting information about them can be extracted using tools such as in Blair[1].
However, over the Klein bottle or $\mathbb{R}P^2$ there is only one such non-trivial bundle (since their second cohomology is $\mathbb{Z}_2$). So in order to classify all of them, one just needs to find out what is the non-trivial bundle.
Question:


*

*What are the non-trivial principal circle bundles over the Klein bottle and $\mathbb{R}P^2$ ?  

*In particular, given a nice base-space with 2nd integral cohomology a finite group (such as $\mathbb{R}P^2$), is there a constructive way to find out what are the non-trivial principal circle bundles over it?
[1]: D.E. Blair, Riemannian Geometry of Contact and Symplectic Manifolds.
 A: Take the quotient $\mathbb S^2\times \mathbb S^1$ by the involution $\iota(x,y)=(-x,-y)$.
A: Another way to describe Anton Petrunin's example is to start with the trivial $S^1$-bundle over $\mathbb RP^2$ and to take the fibrewise connect sum with the Hopf fibration $S^3 \to S^2$.  By fibrewise connect sum I'm referring to taking the regular 2-manifold connect-sum on the base space, and then match that with fibrewise sum on the level of the bundle maps. 
Similarly, the non-trivial $S^1$-bundle over the Klein bottle is the fibrewise sum of the Hopf fibration with the trivial $S^1$-bundle over the Klein bottle.  
IMO this perpsective is helpful in seeing why you wouldn't expect any more principal $S^1$-bundles over non-orientable surfaces, since if you take the connect sum with two Hopf fibrations you can slide the connect-sum around a non-orientable loop and turn the Hopf fibration into the opposite Hopf fibration, which allows you to "cancel" them. 
edit:
Say you have two principal $S^1$-bundles over connected $n$-manifolds $N$ and $M$ respectively.  Call the bundles $p_N : E_N \to N$ and $p_2 : E_M \to M$.  Let $U_N$ and $U_M$ be open sets in $N$ and $M$ respectively whose closures are diffeomorphic to compact balls.  $p_N^{-1}(U_N)$ and $p_M^{-1}(U_M)$ are equivariantly diffeomorphic to $U_N \times S^1$ and $U_M \times S^1$ respectively (with the trivial $S^1$ action).  Given a diffeomorphism $f : \partial U_N \to \partial U_M$ the fibrewise connect sum of $p_N$ and $p_M$ with respect to $f$ is the manifold:
$$ (E_N \setminus p_N^{-1}(U_N) \cup E_M \setminus p_M^{-1}(U_M)) / \sim $$
The equivalence relation $\sim$ comes from identifying $\partial p_N^{-1}(U_N)$ with $\partial p_M^{-1}(U_M)$ -- since they are both trivial $S^1$-bundles (with an essentially canonical trivialization since $U_M$ and $U_N$ are contractible), we can identify them in a preferred way.  This is the union of two principal $S^1$ bundles over a common principal $S^1$-bundle subspace, so it's a principal $S^1$ bundle.  To make it smooth you'll need to adjust the argument slightly using collars. 
A: A third way to think about Anton Petrunin's example is that $S^2 \to {\mathbb R}P^2$ is a ${\mathbb Z}_2$ principal bundle where the action of ${\mathbb Z}_2 = \lbrace +1, -1 \rbrace $ is the obvious action on vectors in ${\mathbb R}^3$.  As ${\mathbb Z}_2$ is a subgroup of $U(1)$, the circle group of complex numbers of length one, you can use standard principal bundle constructions to extend this ${\mathbb Z}_2$ principal  bundle to a $U(1)$  principal bundle. In the case at hand these constructions just give the quotient of $S^2 \times S^1$ by ${\mathbb Z}_2$ as above. 
You can compute the transition functions of this $U(1)$ bundle explicitly with respect to the standard open cover of ${\mathbb R}P^2$ by just computing the same for the ${\mathbb Z}_2$ bundle $S^2 \to {\mathbb R}P^2$ and check that they  give you a Cech representative for the non-zero class in $H^2({\mathbb R}P^2, {\mathbb Z}_2) = {\mathbb Z}_2$. 
The fact that this $U(1)$ bundle has a reduction to ${\mathbb Z}_2$ also tells us that when we square it we will get a trivial $U(1)$ bundle. Just think of squaring the  ${\mathbb Z}_2$ valued transitions functions to get  transitions functions for the squared bundle. Obviously they all just take the value $1$. 
A: Orientable circle bundle with torsion Euler class have been studied systematically. There are exactly the flat $SO(2)$-bundles, see "A Remark on Torsion Euler Classes of Circle Bundles" by
Miyoshi or 
"Flat circle bundles, pullbacks, and the circle made discrete" by Oprea-Tanré.
It is a standard fact that any flat $G$-bundle over a (connected) finite cell complex $X$ can be written as $(\tilde X\times G)/\pi_1(X)$ where $\tilde X$ is the universal cover and $\pi_1(X)$ acts by deck transformations on the first factor, and via some homomorphism $\pi_1(X)\to G$ on the second factor. Thus all examples look like the one given by Anton.
As a caution I wish to point out that many people also studied flat circle bundles 
with $G=Diff(S^1)$. The answer there is different, namely one gets the so called Milnor-Wood inequality as a condition on the Euler class.
