def _addPythonRequirements(self, path, fullpath, pkgFiles):
        destdir = self.recipe.macros.destdir
        destDirLen = len(destdir)

        (sysPath, pythonModuleFinder, pythonVersion
        )= self._getPythonRequiresSysPath(path)

        if not sysPath:
            # Probably a bad interpreter path
            return

        if not pythonModuleFinder:
            # We cannot (reliably) determine runtime python requirements
            # in the cross-compile case, so don't even try (for
            # consistency).
            return

        pythonModuleFinder.load_file(fullpath)
        data = pythonModuleFinder.getDepsForPath(fullpath)
        if data['result'] != 'ok':
            self.info('File %s is not a valid python file', path)
            return

        for depPath in data['paths']:
            if not depPath:
                continue
            flags = None
            absPath = None
            if depPath.startswith(destdir):
                depPath = depPath[destDirLen:]
                flags = self._getPythonFlagsFromPath(depPath)

                # The file providing this dependency is part of this package.
                absPath = depPath
            for sysPathEntry in sysPath:
                if depPath.startswith(sysPathEntry):
                    newDepPath = depPath[len(sysPathEntry)+1:]
                    if newDepPath not in ('__init__', '__init__.py'):
                        # we don't allow bare __init__'s as dependencies.
                        # hopefully we'll find this at deeper level in
                        # in the sysPath
                        if flags is None:
                            # this is provided by the system, so we have
                            # to see with which flags it is provided with
                            flags = self._getPythonFlags(depPath,
                                self.bootstrapPythonFlags)
                        depPath = newDepPath
                        break

            if depPath.startswith('/'):
                # a python file not found in sys.path will not have been
                # provided, so we must not depend on it either
                return
            if not (depPath.endswith('.py') or depPath.endswith('.pyc') or
                    depPath.endswith('.so')):
                # Not something we provide, so not something we can
                # require either.  Drop it and go on.  We have seen
                # this when a script in /usr/bin has ended up in the
                # requires list.
                continue

            if depPath.endswith('module.so'):
                # Strip 'module.so' from the end, make it a candidate
                cands = [ depPath[:-9] + '.so', depPath ]
                cands = [ self._normalizePythonDep(x) for x in cands ]
                if absPath:
                    depName = self._checkPackagePythonDeps(pkgFiles, absPath,
                                                           cands, flags)
                else:
                    depName = self._checkSystemPythonDeps(cands, flags)
            else:
                depName = self._normalizePythonDep(depPath)
                if depName == '__future__':
                    continue
            self._addRequirement(path, depName, flags, pkgFiles,
                                 deps.PythonDependencies)

        #if data['missing']:
        #    self.warn("Python file %s is missing requirements: %s" % (
        #        path, ', '.join(data['missing'])))