def _addPythonProvides(self, path, m, pkgFiles, macros):

        if not self._isPythonModuleCandidate(path):
            return

        sysPath, pythonVersion = self._getPythonProvidesSysPath(path)
        if not sysPath:
            return

        # Add provides for every match in sys.path. For example, PIL.Imaging
        # and Imaging should both be provided since they are both reachable
        # names.
        for sysPathEntry in sysPath:
            if not path.startswith(sysPathEntry):
                continue
            newDepPath = path[len(sysPathEntry)+1:]
            if newDepPath.split('.')[0] == '__init__':
                # we don't allow bare __init__ as a python import
                # hopefully we'll find this init as a deeper import at some
                # other point in the sysPath
                continue
            elif ('site-packages' in newDepPath
                    or 'lib-dynload' in newDepPath
                    or 'plat-linux' in newDepPath
                    ):
                # site-packages should be specifically excluded since both it
                # and its parent are always in sys.path. However, invalid
                # python package names in general are allowed due to certain
                # cases where relative imports happen inside a hyphenated
                # directory and the requires detector picks up on that.
                continue
            # Note that it's possible to have a false positive here. For
            # example, in the PIL case if PIL/__init__.py did not exist,
            # PIL.Imaging would still be provided. The odds of this causing
            # problems are so small that it is not checked for here.
            self._addPythonProvidesSingle(path, m, pkgFiles, macros,
                    newDepPath)