pygame  committed 319acdc

new liquid example, prep for 0.3

  • Participants
  • Parent commits 1134ff2
  • Branches default

Comments (0)

Files changed (6)

+Version: 0.3
 pygame is a cross-platfrom library designed to make it easy to write
 multimedia software, such as games, in Python.
 #everything you can, but you can ignore ones you don't have
 #dependencies for, just comment them out
-#surfarray src/surfarray.c $(SDL)  #requires Numeric
+surfarray src/surfarray.c $(SDL)
 font src/font.c $(SDL) $(FONT)
 image src/image.c $(SDL) $(IMAGE)
 mixer src/mixer.c $(SDL) $(MIXER)
-This is a list of changes in pygame's history.
+#This is a list of changes in pygame's history.
-Nov 15, 2000
+Nov 16, 2000
 	Surface.set_clip() fixed when passing no args [BUG]
 Nov 15, 2000
 	all new_XX() functions were added to pygame.locals
 	Moved to a member of pygame.mixer [BREAK]
 	Surface.blit takes a source rectangle instead of pos, size [BREAK]
- 	pygame.display.set_clip() correctly accepts rectstyle arg [BUG]
+	pygame.display.set_clip() correctly accepts rectstyle arg [BUG]
 	Added Surface.get_flags() and Surface.get_pitch()
 	Added set_cursor and get_cursor to pygame.mouse
 	New module, pygame.cursors, contains sample cursors


 import os, sys, shutil
 from glob import glob
 huntpaths = ['..', '..'+os.sep+'..', '..'+os.sep+'*', \
 class Dependency:
     inc_hunt = ['include']
     lib_hunt = [os.path.join('VisualC', 'SDL', 'Release'),

File examples/

 strange. Learning to use numeric for images like this takes a
 bit of learning, but the payoff is extremely fast image
 manipulation in python.
+Just so you know how this breaks down. For each sampling of
+time, 30% goes to each creating the gradient and blitting the
+array. The final 40% goes to flipping/updating the display surface
 The code also demonstrates use of the timer events."""
     size = 640, 480
     screen = pygame.display.set_mode(size)
+    f = screen.get_flags()
+    print f
     pygame.event.set_blocked(MOUSEMOTION) #keep our queue cleaner
     pygame.time.set_timer(USEREVENT, 500)
 #       python install
 import os.path, glob, sys
+import distutils.sysconfig 
 from distutils.core import setup, Extension
 from distutils.extension import read_setup_file
 from distutils.ccompiler import new_compiler
-#from distutils.sysconfig import get_python_inc
+if sys.version_info[0] < 2:
+    raise SystemExit, """pygame requires python 2.0 or higher"""
 #headers to install
 headers = glob.glob(os.path.join('src', '*.h'))
 #get compile info for all extensions
     extensions = read_setup_file('Setup')
 except IOError:
-    raise SystemExit, \
-"""Need a valid "Setup" file for compiling.
-Make of copy of "" end edit,
-or run "" to create a new one."""
+    raise SystemExit, """Need a "Setup" file for compiling."""
 #extra files to install
 data_files = []
 #try to find libaries and copy them too
 #(great for windows, bad for linux)
 if sys.platform == 'win32':
             if os.path.isfile(p) and p not in data_files:
 #don't need to actually compile the COPYLIB modules
 for e in extensions[:]:
-    if[:8] == 'COPYLIB_':
+    if'COPYLIB_'):
+#we can detect the presence of python dependencies, remove any unfound
+pythondeps = {'surfarray': ['Numeric']}
+for e in extensions[:]:
+    modules = pythondeps.get(, [])
+    if modules:
+        try:
+            for module in modules:
+                x = __import__(module)
+                del x
+        except ImportError:
+            print 'NOTE: Not compiling:',, ' (module not found='+module+')'
+            extensions.remove(e)
 setup (name = "pygame",
-       version = '0.2',
+       version = '0.3',
        maintainer = "Pete Shinners",
        maintainer_email = "",
        description = "Python Game Development module",
        url = "",
        packages = [''],
        package_dir = {'': 'lib'},
        extra_path = ('pygame/ignore', 'pygame'),
        headers = headers,
        ext_modules = extensions,
        data_files = [['pygame', data_files]]
-       )
+     )