d542ba
diff -up Python-2.7.3/Lib/test/test_support.py.rhbz913732 Python-2.7.3/Lib/test/test_support.py
d542ba
--- Python-2.7.3/Lib/test/test_support.py.rhbz913732	2013-03-04 16:11:53.757315921 -0500
d542ba
+++ Python-2.7.3/Lib/test/test_support.py	2013-03-04 16:12:11.331314722 -0500
d542ba
@@ -304,7 +304,8 @@ def bind_port(sock, host=HOST):
d542ba
             if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) == 1:
d542ba
                 raise TestFailed("tests should never set the SO_REUSEADDR "   \
d542ba
                                  "socket option on TCP/IP sockets!")
d542ba
-        if hasattr(socket, 'SO_REUSEPORT'):
d542ba
+        if hasattr(socket, 'SO_REUSEPORT') \
d542ba
+                and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
Matej Stuchlik ebcba8
             try:
Matej Stuchlik ebcba8
                 if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
Matej Stuchlik ebcba8
                     raise TestFailed("tests should never set the SO_REUSEPORT "   \
Matej Stuchlik ebcba8
                                      "socket option on TCP/IP sockets!")