Beispiel #1
0
def load_pypylib():
    from pypy.translator.cli.rte import get_pypy_dll
    dll = get_pypy_dll()
    try:
        import clr
        from System.Reflection import Assembly
    except ImportError:
        pass
    else:
        ass = Assembly.LoadFrom(dll)
        assert ass is not None
        clr.AddReference(pypylib)
    load_assembly(pypylib)
Beispiel #2
0
def load_pypylib():
    from pypy.translator.cli.rte import get_pypy_dll
    dll = get_pypy_dll()
    try:
        import clr
        from System.Reflection import Assembly
    except ImportError:
        pass
    else:
        ass = Assembly.LoadFrom(dll)
        assert ass is not None
        clr.AddReference(pypylib)
    load_assembly(pypylib)
Beispiel #3
0
    def build_exe(self):        
        if getoption('source'):
            return None

        pypy_dll = get_pypy_dll() # get or recompile pypy.dll
        shutil.copy(pypy_dll, self.tmpdir.strpath)

        ilasm = SDK.ilasm()
        tmpfile = self.tmpfile.strpath
        self._exec_helper(ilasm, [tmpfile]+self.entrypoint.ilasm_flags(),
                          'ilasm failed to assemble (%s):\n%s\n%s',
                          timeout = 900)
        # Mono's ilasm occasionally deadlocks.  We set a timer to avoid
        # blocking automated test runs forever.

        self.outfile = self.entrypoint.output_filename(tmpfile)
        if getoption('verify'):
            peverify = SDK.peverify()
            self._exec_helper(peverify, [outfile], 'peverify failed to verify (%s):\n%s\n%s')
        return self.outfile
Beispiel #4
0
    def build_exe(self):
        if getoption('source'):
            return None

        pypy_dll = get_pypy_dll()  # get or recompile pypy.dll
        shutil.copy(pypy_dll, self.tmpdir.strpath)

        ilasm = SDK.ilasm()
        tmpfile = self.tmpfile.strpath
        self.outfile = self.entrypoint.output_filename(tmpfile)
        argv = [tmpfile, '/output:' + self.outfile
                ] + self.entrypoint.ilasm_flags()
        self._exec_helper(ilasm,
                          argv,
                          'ilasm failed to assemble (%s):\n%s\n%s',
                          timeout=900)
        # Mono's ilasm occasionally deadlocks.  We set a timer to avoid
        # blocking automated test runs forever.

        if getoption('verify'):
            peverify = SDK.peverify()
            self._exec_helper(peverify, [outfile],
                              'peverify failed to verify (%s):\n%s\n%s')
        return self.outfile