Anonymous avatar Anonymous committed 319acdc

new liquid example, prep for 0.3

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 pygame.music 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+'*', \
              '..'+os.sep+'..'+os.sep+'*']
 
+
 class Dependency:
     inc_hunt = ['include']
     lib_hunt = [os.path.join('VisualC', 'SDL', 'Release'),

examples/vgrade.py

 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."""
 
 
     pygame.init()
     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 setup.py 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
 try:
     extensions = read_setup_file('Setup')
 except IOError:
-    raise SystemExit, \
-"""Need a valid "Setup" file for compiling.
-Make of copy of "Setup.in" end edit,
-or run "confighelp.py" 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:
                 data_files.append(p)
 
-
 #don't need to actually compile the COPYLIB modules
 for e in extensions[:]:
-    if e.name[:8] == 'COPYLIB_':
+    if e.name.startswith('COPYLIB_'):
         extensions.remove(e)
 
+#we can detect the presence of python dependencies, remove any unfound
+pythondeps = {'surfarray': ['Numeric']}
+for e in extensions[:]:
+    modules = pythondeps.get(e.name, [])
+    if modules:
+        try:
+            for module in modules:
+                x = __import__(module)
+                del x
+        except ImportError:
+            print 'NOTE: Not compiling:', e.name, ' (module not found='+module+')'
+            extensions.remove(e)
 
 
 
 setup (name = "pygame",
-       version = '0.2',
+       version = '0.3',
        maintainer = "Pete Shinners",
        maintainer_email = "shredwheat@mediaone.net",
        description = "Python Game Development module",
        url = "http://pygame.seul.org",
-
        packages = [''],
        package_dir = {'': 'lib'},
        extra_path = ('pygame/ignore', 'pygame'),
-
        headers = headers,
        ext_modules = extensions,
        data_files = [['pygame', data_files]]
-       )
-
+     )  
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.