[pypy-svn] r62708 - in pypy/trunk/pypy/rlib/rsdl: . test

santagada at codespeak.net santagada at codespeak.net
Sat Mar 7 15:28:54 CET 2009


Author: santagada
Date: Sat Mar  7 15:28:54 2009
New Revision: 62708

Modified:
   pypy/trunk/pypy/rlib/rsdl/RIMG.py
   pypy/trunk/pypy/rlib/rsdl/RMix.py
   pypy/trunk/pypy/rlib/rsdl/eci.py
   pypy/trunk/pypy/rlib/rsdl/test/conftest.py
Log:
Updated the eci for rsdl, their conftest and made RIMG work properly on osx

Modified: pypy/trunk/pypy/rlib/rsdl/RIMG.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsdl/RIMG.py	(original)
+++ pypy/trunk/pypy/rlib/rsdl/RIMG.py	Sat Mar  7 15:28:54 2009
@@ -1,12 +1,22 @@
+import sys
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rpython.tool import rffi_platform as platform
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 from pypy.rlib.rsdl import RSDL
 
-eci = ExternalCompilationInfo(
-    includes=['SDL_image.h'],
-    libraries=['SDL_image'],
+
+if sys.platform == 'darwin':
+    eci = ExternalCompilationInfo(
+        includes = ['SDL_image.h'],
+        frameworks = ['SDL_image'],
+        include_dirs = ['/Library/Frameworks/SDL_image.framework/Headers']
+    )
+else:
+    eci = ExternalCompilationInfo(
+        includes=['SDL_image.h'],
+        libraries=['SDL_image'],
     )
+
 eci = eci.merge(RSDL.eci)
 
 def external(name, args, result):

Modified: pypy/trunk/pypy/rlib/rsdl/RMix.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsdl/RMix.py	(original)
+++ pypy/trunk/pypy/rlib/rsdl/RMix.py	Sat Mar  7 15:28:54 2009
@@ -1,8 +1,9 @@
+import sys
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rpython.tool import rffi_platform as platform
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 from pypy.rlib.rsdl import RSDL
-import sys
+
 
 if sys.platform == 'darwin':
     eci = ExternalCompilationInfo(

Modified: pypy/trunk/pypy/rlib/rsdl/eci.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsdl/eci.py	(original)
+++ pypy/trunk/pypy/rlib/rsdl/eci.py	Sat Mar  7 15:28:54 2009
@@ -8,7 +8,7 @@
         eci = ExternalCompilationInfo(
             includes = ['SDL.h'],
             include_dirs = ['/Library/Frameworks/SDL.framework/Headers'],
-            link_extra = [
+            link_files = [
                 str(py.magic.autopath().dirpath().join('macosx-sdl-main/SDLMain.m')),
             ],
             frameworks = ['SDL', 'Cocoa']

Modified: pypy/trunk/pypy/rlib/rsdl/test/conftest.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsdl/test/conftest.py	(original)
+++ pypy/trunk/pypy/rlib/rsdl/test/conftest.py	Sat Mar  7 15:28:54 2009
@@ -2,9 +2,10 @@
 import py
 
 class Directory(py.test.collect.Directory):
-    def run(self):
+    def collect(self):
         try:
             check_sdl_installation()
         except SDLNotInstalled, e:
+            raise
             py.test.skip("SDL not installed(?): %s" % (e,))
-        return py.test.collect.Directory.run(self)
+        return py.test.collect.Directory.collect(self)



More information about the Pypy-commit mailing list