def pyrobufize_builtins(self):
        from jinja2 import Environment, PackageLoader
        from Cython.Build import cythonize
        env = Environment(loader=PackageLoader('pyrobuf.protobuf', 'templates'))

        templ_pyx = env.get_template('pyrobuf_list_pyx.tmpl')
        templ_pxd = env.get_template('pyrobuf_list_pxd.tmpl')

        listdict = {
            'DoubleList':   'double',
            'FloatList':    'float',
            'IntList':      'int',
            'Int32List':    'int32_t',
            'Uint32List':   'uint32_t',
            'Int64List':    'int64_t',
            'Uint64List':   'uint64_t',
            'CharList':     'char'
        }

        format_map = {
            'double': 'd',
            'float': 'f',
            'int': 'i',
            'int32_t': 'i',
            'uint32_t': 'I',
            'int64_t': 'L',
            'uint64_t': 'K',
            'char': 'c',
        }

        # Even if PYROBUF_LIST_PYX and PYROBUF_LIST_PXD already exist they should be re-built because
        # we don't know whether they were built using *this* version of Python.
        path = os.path.join(HERE, 'pyrobuf', 'src', PYROBUF_LIST_PYX)
        if not self.dry_run:
            with open(path, 'w') as fp:
                fp.write(templ_pyx.render(
                    {'def': listdict, 'version_major': sys.version_info.major, 'format_map': format_map}
                ))
        if self.verbose >= 1:
            log.info((PYROBUF_LIST_PYX, templ_pyx.filename) % "rendering '%s' from '%s'")

        path = os.path.join(HERE, 'pyrobuf', 'src', PYROBUF_LIST_PXD)
        if not self.dry_run:
            with open(path, 'w') as fp:
                fp.write(templ_pxd.render(
                    {'def': listdict, 'version_major': sys.version_info.major, 'format_map': format_map}
                ))
        if self.verbose >= 1:
            log.info("rendering '%s' from '%s'" % (PYROBUF_LIST_PXD, templ_pxd.filename))

        return cythonize(['pyrobuf/src/*.pyx'],
                         include_path=['pyrobuf/src'])
dataset/ETHPy150Open appnexus/pyrobuf/setup.py/PyrobufDistribution.pyrobufize_builtins/swapped operands of `%`