def _getPythonVersionFromPath(self, pathName, destdir):
        if destdir and pathName.startswith(destdir):
            pathName = pathName[len(destdir):]

        pathList = pathName.split('/')
        for dirName in pathList:
            if dirName.startswith('python') and self._stringIsPythonVersion(
                    dirName[6:]):
                # python2.4 or python2.5 or python3.9 but not python.so
                return dirName
        return ''