Commits

Alex Gaynor committed 0f2efc9

fix translating with an exe_name thats in a nested directory

  • Participants
  • Parent commits 4787278

Comments (0)

Files changed (3)

pypy/module/sys/vm.py

 def exc_info_with_tb(space):
     operror = space.getexecutioncontext().sys_exc_info()
     if operror is None:
-        return space.newtuple([space.w_None,space.w_None,space.w_None])
+        return space.newtuple([space.w_None, space.w_None, space.w_None])
     else:
         return space.newtuple([operror.w_type, operror.get_w_value(space),
                                space.wrap(operror.get_traceback())])

rpython/translator/platform/posix.py

             cflags = self.cflags + self.standalone_only
 
         m = GnuMakefile(path)
-        m.exe_name = exe_name
+        m.exe_name = path.join(target_name)
         m.eci = eci
 
         def rpyrel(fpath):

rpython/translator/platform/windows.py

         else:
             exe_name = exe_name.new(ext=self.exe_ext)
 
+        if shared:
+            so_name = exe_name.new(purebasename='lib' + exe_name.purebasename,
+                                   ext=self.so_ext)
+            target_name = so_name.basename
+        else:
+            target_name = exe_name.basename
+
         m = NMakefile(path)
-        m.exe_name = exe_name
+        m.exe_name = path.join(target_name)
         m.eci = eci
 
         linkflags = list(self.link_flags)
         # This is required for the JIT.
         linkflags.append('/opt:noicf')
 
-        if shared:
-            so_name = exe_name.new(purebasename='lib' + exe_name.purebasename,
-                                   ext=self.so_ext)
-            target_name = so_name.basename
-        else:
-            target_name = exe_name.basename
-
         def rpyrel(fpath):
             rel = py.path.local(fpath).relto(rpypath)
             if rel: