Lenard Lindstrom avatar Lenard Lindstrom committed 782f92b

Add conditional bufferproxy imports to __init__.py.
This ensures its present when dependent modules are imported.
It also prompts py2exe/py2app to include bufferproxy.

Comments (0)

Files changed (2)

 
 try: from pygame.surface import *
 except (ImportError,IOError):Surface = lambda:Missing_Function
+else:
+    # Required by pygame.surface.
+    import pygame.bufferproxy
+
 
 try:
     import pygame.mask
 
 try: import pygame.mixer
 except (ImportError,IOError), msg:mixer=MissingModule("mixer", msg, 0)
+else:
+    # Required by pygame.mixer.
+    import pygame.bufferproxy
 
 try: import pygame.movie
 except (ImportError,IOError), msg:movie=MissingModule("movie", msg, 0)

test/surfarray_test.py

                             (surf.get_bitsize(), surf.get_flags()))
             surf.set_alpha(blacket_alpha)
 
-        # blanket alpha bug for per-pixel alpha surface when blanket alpha 0.
+        # Bug for per-pixel alpha surface when blanket alpha 0.
         for surf in targets:
             blanket_alpha = surf.get_alpha()
             surf.set_alpha(0)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.