From 58c98deebb2683a9be72a4590dfebc1ac2a960c3 Mon Sep 17 00:00:00 2001 From: James Emerton Date: Fri, 10 Jan 2014 13:41:16 -0800 Subject: [PATCH] Fallback when get_ext_fullpath() is unavailable --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 56aad293..6e4f4ae0 100644 --- a/setup.py +++ b/setup.py @@ -293,7 +293,11 @@ class psycopg_build_ext(build_ext): manifest = '_psycopg.vc9.x86.manifest' if platform == 'win-amd64': manifest = '_psycopg.vc9.amd64.manifest' - ext_path = self.get_ext_fullpath(extension.name) + try: + ext_path = self.get_ext_fullpath(extension.name) + except AttributeError: + ext_path = os.path.join(self.build_lib, + 'psycopg2', '_psycopg.pyd') self.compiler.spawn( ['mt.exe', '-nologo', '-manifest', os.path.join('psycopg', manifest),