#!/usr/bin/env python # This script allows us to get the path that the python extensions are # built in, prior to being installed. This allows us to run tests # without needing to perform an installation. import os, sys import string from distutils.util import get_platform # Get the root path for the source as this contains the BaDCA package testPath = os.path.dirname(sys.argv[0]) rootPath = os.path.abspath(testPath + '/..') # These lines from distutils to ensure we have the correct dir names plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) try: debug_ext = sys.pydebug and '_d' or '' except AttributeError: debug_ext = '' print os.path.join(rootPath, 'openssl/build/lib' + debug_ext + plat_specifier)