def has_lib(self):
        """Returns true if the current distribution has any Python
        modules to install."""
        return (
            self.distribution.has_pure_modules() or self.distribution.has_ext_modules()
        )
Returns true if the current distribution has any Python
        modules to install.
product/gradle-plugin/src/main/python/setuptools/_distutils/command/install.py