[Python-checkins] CVS: python/dist/src setup.py,1.77,1.78
Michael Hudson
mwh@users.sourceforge.net
Wed, 23 Jan 2002 07:07:48 -0800
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv14038
Modified Files:
setup.py
Log Message:
Fix for
[ #433775 ] module build dir first in test import
though not in the way the summary would suggest; use imp.load_dynamic()
in setup.py to ensure we're testing the dynamic object we think we are.
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** setup.py 2002/01/23 15:04:41 1.77
--- setup.py 2002/01/23 15:07:46 1.78
***************
*** 4,8 ****
__version__ = "$Revision$"
! import sys, os, getopt
from distutils import sysconfig
from distutils import text_file
--- 4,8 ----
__version__ = "$Revision$"
! import sys, os, getopt, imp
from distutils import sysconfig
from distutils import text_file
***************
*** 169,174 ****
ext.name)
return
try:
! __import__(ext.name)
except ImportError:
self.announce('WARNING: removing "%s" since importing it failed' %
--- 169,177 ----
ext.name)
return
+ ext_filename = os.path.join(
+ self.build_lib,
+ self.get_ext_filename(self.get_ext_fullname(ext.name)))
try:
! imp.load_dynamic(ext.name, ext_filename)
except ImportError:
self.announce('WARNING: removing "%s" since importing it failed' %