コード例 #1
0
    def run(self):
        """Run - pass execution to generate_qcd"""

        filepaths = generate_qcd(self.num_colours, self.precision,
                                 self.representation)

        from Cython.Build.Dependencies import cythonize_one
        from Cython.Compiler.Main import CompilationOptions

        options = CompilationOptions()
        options.cplus = True

        for src_path in filepaths:
            if not src_path.endswith(".pyx"):
                raise ValueError(
                    "Aborted attempt to cythonize file '{}'".format(src_path))

            dest_path = src_path[-3:] + "cpp"
            cythonize_one(src_path, dest_path, None, False, options=options)
コード例 #2
0
ファイル: __init__.py プロジェクト: mspraggs/pyQCD
    def run(self):
        """Run - pass execution to generate_qcd"""

        filepaths = generate_qcd(self.num_colours, self.precision,
                                 self.representation)

        from Cython.Build.Dependencies import cythonize_one
        from Cython.Compiler.Main import CompilationOptions

        options = CompilationOptions()
        options.cplus = True

        for src_path in filepaths:
            if not src_path.endswith(".pyx"):
                raise ValueError("Aborted attempt to cythonize file '{}'"
                                 .format(src_path))

            dest_path = src_path[-3:] + "cpp"
            cythonize_one(src_path, dest_path, None, False, options=options)
コード例 #3
0
ファイル: setup.py プロジェクト: odellma/pygame
                          dict(pyx_file=pyx_file,
                               c_file=c_file,
                               fingerprint=None,
                               quiet=False,
                               options=c_options,
                               full_module_name=ext.name,
                               embedded_metadata=pyx_meta.get(ext.name))))

    # compile in right order
    queue.sort(key=lambda a: a[0])
    queue = [pair[1] for pair in queue]

    count = len(queue)
    for i, kwargs in enumerate(queue):
        kwargs['progress'] = '[{}/{}] '.format(i + 1, count)
        cythonize_one(**kwargs)

AUTO_CONFIG = False
if consume_arg('-auto'):
    AUTO_CONFIG = True

import os.path, glob, stat, shutil
import distutils.sysconfig
from distutils.core import setup, Command
from distutils.extension import read_setup_file
from distutils.command.install_data import install_data
from distutils.command.sdist import sdist

revision = ''