1. Pypy
  2. Untitled project
  3. pypy

Commits

Matti Picus  committed 3b9b82a

respect PYPY_LOCALBASE in windows

  • Participants
  • Parent commits 4b806e5
  • Branches default

Comments (0)

Files changed (2)

File rpython/translator/platform/test/test_posix.py

View file
  • Ignore whitespace
         finally:
             del os.environ['PYPY_LOCALBASE']
         Makefile = tmpdir.join('Makefile').read()
-        assert 'INCLUDEDIRS = -I/foo/baz/include' in Makefile
-        assert 'LIBDIRS = -L/foo/baz/lib' in Makefile
+        include_prefix = '-I'
+        lib_prefix = '-L'
+        if self.platform.name == 'msvc':
+            include_prefix = '/I'
+            lib_prefix = '/LIBPATH:'
+        assert 'INCLUDEDIRS = %s/foo/baz/include' % include_prefix in Makefile
+        assert 'LIBDIRS = %s/foo/baz/lib' % lib_prefix in Makefile
 
 class TestMaemo(TestMakefile):
     strict_on_stderr = False

File rpython/translator/platform/windows.py

View file
  • Ignore whitespace
         rel_ofiles = [rel_cfile[:rel_cfile.rfind('.')]+'.obj' for rel_cfile in rel_cfiles]
         m.cfiles = rel_cfiles
 
-        rel_includedirs = [rpyrel(incldir) for incldir in eci.include_dirs]
+        rel_includedirs = [rpyrel(incldir) for incldir in
+                           self.preprocess_include_dirs(eci.include_dirs)]
+        rel_libdirs = [rpyrel(libdir) for libdir in
+                       self.preprocess_library_dirs(eci.library_dirs)]
 
         m.comment('automatically generated makefile')
         definitions = [
             ('SOURCES', rel_cfiles),
             ('OBJECTS', rel_ofiles),
             ('LIBS', self._libs(eci.libraries)),
-            ('LIBDIRS', self._libdirs(eci.library_dirs)),
+            ('LIBDIRS', self._libdirs(rel_libdirs)),
             ('INCLUDEDIRS', self._includedirs(rel_includedirs)),
             ('CFLAGS', self.cflags),
             ('CFLAGSEXTRA', list(eci.compile_extra)),