Commit 61e85cec authored by Stefan Behnel's avatar Stefan Behnel

another embed test fix for Python 2.4

parent 1422b74f
......@@ -646,9 +646,15 @@ class EmbedTest(unittest.TestCase):
def test_embed(self):
from distutils import sysconfig
libname = sysconfig.get_config_var('LIBRARY')
libdir = sysconfig.get_config_var('LIBDIR')
if not os.path.isdir(libdir) or libname not in os.listdir(libdir):
libdir = os.path.join(os.path.dirname(sys.executable), '..', 'lib')
if not os.path.isdir(libdir) or libname not in os.listdir(libdir):
libdir = os.path.join(libdir, 'python%d.%d' % sys.version_info[:2], 'config')
if not os.path.isdir(libdir) or libname not in os.listdir(libdir):
# report the error for the original directory
libdir = sysconfig.get_config_var('LIBDIR')
if not os.path.isdir(libdir):
libdir = os.path.join(os.path.dirname(sys.executable), '../lib')
self.assert_(os.system(
"make PYTHON='%s' LIBDIR1='%s' test > make.output" % (sys.executable, libdir)) == 0)
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment