How to use the pybase64.distutils.ccompilercapabilities.CCompilerCapabilities function in pybase64

To help you get started, we’ve selected a few pybase64 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 mayeut / pybase64 / setup.py View on Github external
if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        capabilities = CCompilerCapabilities(self.compiler)
        pybase64_write_config(capabilities)

        objects = list()

        for simd_opt in (CCompilerCapabilities.SIMD_SSSE3,
                         CCompilerCapabilities.SIMD_SSE41,
                         CCompilerCapabilities.SIMD_SSE42,
                         CCompilerCapabilities.SIMD_AVX,
                         CCompilerCapabilities.SIMD_AVX2,
                         CCompilerCapabilities.SIMD_NEON32,
                         CCompilerCapabilities.SIMD_NEON64):
            if len(simd_sources[simd_opt]) == 0:
                continue
            if capabilities.has(simd_opt):
                objects = objects + self.compiler.compile(
                    simd_sources[simd_opt],
                    output_dir=self.build_temp,
                    include_dirs=ext.include_dirs,
                    debug=self.debug,
                    extra_postargs=capabilities.flags(simd_opt),
                    depends=ext.depends)
            else:
                sources = sources + simd_sources[simd_opt]
github mayeut / pybase64 / setup.py View on Github external
if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        capabilities = CCompilerCapabilities(self.compiler)
        pybase64_write_config(capabilities)

        objects = list()

        for simd_opt in (CCompilerCapabilities.SIMD_SSSE3,
                         CCompilerCapabilities.SIMD_SSE41,
                         CCompilerCapabilities.SIMD_SSE42,
                         CCompilerCapabilities.SIMD_AVX,
                         CCompilerCapabilities.SIMD_AVX2,
                         CCompilerCapabilities.SIMD_NEON32,
                         CCompilerCapabilities.SIMD_NEON64):
            if len(simd_sources[simd_opt]) == 0:
                continue
            if capabilities.has(simd_opt):
                objects = objects + self.compiler.compile(
                    simd_sources[simd_opt],
                    output_dir=self.build_temp,
                    include_dirs=ext.include_dirs,
                    debug=self.debug,
                    extra_postargs=capabilities.flags(simd_opt),
                    depends=ext.depends)
            else:
                sources = sources + simd_sources[simd_opt]

        objects = objects + self.compiler.compile(
github mayeut / pybase64 / setup.py View on Github external
depends = sources + ext.depends

        try:
            simd_sources_values = simd_sources.itervalues()
        except AttributeError:
            simd_sources_values = simd_sources.values()
        for add_sources in simd_sources_values:
            depends = depends + add_sources

        if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        capabilities = CCompilerCapabilities(self.compiler)
        pybase64_write_config(capabilities)

        objects = list()

        for simd_opt in (CCompilerCapabilities.SIMD_SSSE3,
                         CCompilerCapabilities.SIMD_SSE41,
                         CCompilerCapabilities.SIMD_SSE42,
                         CCompilerCapabilities.SIMD_AVX,
                         CCompilerCapabilities.SIMD_AVX2,
                         CCompilerCapabilities.SIMD_NEON32,
                         CCompilerCapabilities.SIMD_NEON64):
            if len(simd_sources[simd_opt]) == 0:
                continue
            if capabilities.has(simd_opt):
                objects = objects + self.compiler.compile(
                    simd_sources[simd_opt],