Merge remote branch 'jason/devel' into devel

This commit is contained in:
Daniele Varrazzo 2011-02-17 11:50:14 +00:00
commit 7756eae573
2 changed files with 9 additions and 7 deletions

View File

@ -56,6 +56,10 @@ from distutils.sysconfig import get_python_inc
from distutils.ccompiler import get_default_compiler from distutils.ccompiler import get_default_compiler
from distutils.dep_util import newer_group from distutils.dep_util import newer_group
from distutils.util import get_platform from distutils.util import get_platform
try:
from distutils.msvc9compiler import MSVCCompiler
except ImportError:
MSVCCompiler = None
try: try:
from distutils.command.build_py import build_py_2to3 as build_py from distutils.command.build_py import build_py_2to3 as build_py
except ImportError: except ImportError:
@ -154,11 +158,9 @@ class psycopg_build_ext(build_ext):
def build_extension(self, ext): def build_extension(self, ext):
build_ext.build_extension(self, ext) build_ext.build_extension(self, ext)
# For MSVC compiler and Python 2.6/2.7 (aka VS 2008), re-insert the # For Python versions that use MSVC compiler 2008, re-insert the
# Manifest into the resulting .pyd file. # manifest into the resulting .pyd file.
sysVer = sys.version_info[:2] if MSVCCompiler and isinstance(self.compiler, MSVCCompiler):
if self.get_compiler().lower().startswith('msvc') and \
sysVer in ((2,6), (2,7)):
platform = get_platform() platform = get_platform()
# Default to the x86 manifest # Default to the x86 manifest
manifest = '_psycopg.vc9.x86.manifest' manifest = '_psycopg.vc9.x86.manifest'

View File

@ -119,7 +119,7 @@ class ConnectionTests(unittest.TestCase):
def slave(): def slave():
cnn = psycopg2.connect(dsn) cnn = psycopg2.connect(dsn)
cur = cnn.cursor() cur = cnn.cursor()
cur.execute("select pg_sleep(2)") cur.execute("select pg_sleep(3)")
cur.close() cur.close()
cnn.close() cnn.close()
@ -130,7 +130,7 @@ class ConnectionTests(unittest.TestCase):
t2.start() t2.start()
t1.join() t1.join()
t2.join() t2.join()
self.assert_(time.time() - t0 < 3, self.assert_(time.time() - t0 < 5,
"something broken in concurrency") "something broken in concurrency")
def test_encoding_name(self): def test_encoding_name(self):