How to use the azure-cognitiveservices-search-websearch.azure_bdist_wheel.bdist_wheel.write_record function in azure-cognitiveservices-search-websearch

To help you get started, we’ve selected a few azure-cognitiveservices-search-websearch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-cognitiveservices-search-websearch / azure_bdist_wheel.py View on Github external
def write_record(self, bdist_dir, distinfo_dir):
        if self.azure_namespace_package:
            # Split and remove last part, assuming it's "nspkg"
            subparts = self.azure_namespace_package.split('-')[0:-1]
        folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))]
        for azure_sub_package in folder_with_init:
            init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py')
            if os.path.isfile(init_file):
                logger.info("manually remove {} while building the wheel".format(init_file))
                os.remove(init_file)
            else:
                raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file))
        bdist_wheel.write_record(self, bdist_dir, distinfo_dir)
cmdclass = {

azure-cognitiveservices-search-websearch

Microsoft Azure Cognitive Services Web Search Client Library for Python

MIT
Latest version published 6 months ago

Package Health Score

81 / 100
Full package analysis

Popular azure-cognitiveservices-search-websearch functions

Similar packages