Commits

Anonymous committed ed630dc

Merged with trunk rev 2455.

Comments (0)

Files changed (8)

 draw src/draw.c $(SDL) $(DEBUG)
 image src/image.c $(SDL) $(DEBUG)
 overlay src/overlay.c $(SDL) $(DEBUG)
-transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG)
+transform src/transform.c src/rotozoom.c src/scale2x.c src/scale_mmx.c $(SDL) $(DEBUG) -D_NO_MMX_FOR_X86_64
 mask src/mask.c src/bitmask.c $(SDL) $(DEBUG)
 bufferproxy src/bufferproxy.c $(SDL) $(DEBUG)
 pixelarray src/pixelarray.c $(SDL) $(DEBUG)
 # BREAK = change breaks existing code
 # BUG    = fixed a bug that was (or could have been) crashing
 
+[SVN 2454] July 2, 2009
+    Patch to work around cpu detection bugs in SDL 64bit from Lenard.  
+      Thanks to Lorenz for bug hunting.
+
 [SVN 2380-2381] Jun 19, 2009
     Color.set_length method... to change Color length to 1,2,3 or 4.
     Surface.get_palette(_at) return Color with length 3.
     ext_to_remove = ["camera"]
 
     # here are the .py/.pyo/.pyc files we need to ask to remove.
-    #py_to_remove = ["color"]
-    # color.py from the symbian branch imports color.so
-    py_to_remove = []
+    py_to_remove = ["color"]
     
     if os.name == "e32": # Don't warn on Symbian. The color.py is used as a wrapper.
         py_to_remove = []
             warnings.warn(message, RuntimeWarning, level)
         except ImportError:
             print (message)
-        
-warn_unwanted_files()
+
+
+# disable, because we hopefully don't need it.
+#warn_unwanted_files()
 
 
 
 releases. (hmm, until we get to versions > 10)
 """
 
-ver =   '1.9.0rc1'
+ver =   '1.9.0rc2'
 vernum = 1,9,0
 <font size=+5><b>Pygame Readme</b></font>
 </td></tr><tr><td align=left width=33%><big>
 
-Version 1.9.0rc1
+Version 1.9.0rc2
 
 
 </td><td align=center width=34%><big>
 Special thanks are also in order.
 
 <li>Marcus Von Appen - many changes, and fixes, 1.7.1+ freebsd maintainer.</li>
-<li>Lenard Lindstrom - the 1.8+ windows maintainer.</li>
+<li>Lenard Lindstrom - the 1.8+ windows maintainer, many changes, and fixes.</li>
 <li>Brian Fisher - for svn auto builder, bug tracker and many contributions.</li>
 <li>Rene Dudfield - many changes, and fixes, 1.7+ release manager/maintainer.</li>
 <li>Phil Hassey - for his work on the pygame.org website.</li>
    Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya,
    Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber
    Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, 
-   Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine</li>
+   Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine,
+   Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel.</li>
 
 <li>And our bug hunters above and beyond:
     Angus, Guillaume Proux, Frank Raiser,
    Also many thanks for people creating games and putting them on the 
    pygame.org website for others to learn from and enjoy.
 </p><p>
+   Lots of thanks to James Paige for hosting the pygame bugzilla.
+</p><p>
 Also a big thanks to Roger Dingledine and the crew at SEUL.ORG
 for our excellent hosting.
 </p></blockquote></p><br>
 
    Pygame Readme
-   Version 1.9.0rc1 Python Game Development
+   Version 1.9.0rc2 Python Game Development
    Originally by Pete Shinners, now an open source community project.
    http://www.pygame.org
    pygame@seul.org
 
      Marcus Von Appen - many changes, and fixes, 1.7.1+ freebsd maintainer.
 
-     Lenard Lindstrom - the 1.8+ windows maintainer.
+     Lenard Lindstrom - the 1.8+ windows maintainer, many changes, and fixes.
      
      Brian Fisher - for svn auto builder, bug tracker and many contributions.
 
    Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya,
    Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber
    Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, 
-   Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine
+   Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine,
+   Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel.
 
      And our bug hunters above and beyond: Angus, Guillaume Proux, Frank
    Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, 
    Also many thanks for people creating games and putting them on the 
    pygame.org website for others to learn from and enjoy.
 
+   Lots of thanks to James Paige for hosting the pygame bugzilla.
+
    Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our
    excellent hosting.
 
+
+
    Dependencies
 
      Pygame is obviously strongly dependent on SDL and Python. It also
 
 METADATA = {
     "name":             "pygame",
-    "version":          "1.9.0rc1",
+    "version":          "1.9.0rc2",
     "license":          "LGPL",
     "url":              "http://www.pygame.org",
     "author":           "Pete Shinners, Rene Dudfield, Marcus von Appen, Bob Pendleton, others...",
                         "SURFAR~1.PYD|surfarray.pyd", prop, 1),
                        ("sndarray.pyd", comp,
                         "SNDARRAY.PYD|sndarray.pyd", prop, 1),
+                       ("camera.pyd", comp, "CAMERA.PYD|camera.pyd", prop, 1),
                        ("color.py", comp, "COLOR.PY|color.py", prop, 1),
                        ("color.pyc", comp, "COLOR.PYC|color.pyc", prop, 1),
                        ("color.pyo", comp, "COLOR.PYO|color.pyo", prop, 1)]
 
 
 
+
+
 # test command.  For doing 'python setup.py test'
 
 class TestCommand(Command):
 PACKAGEDATA.update(METADATA)
 PACKAGEDATA.update(EXTRAS)
 setup(**PACKAGEDATA)
+
+
+def remove_old_files():
+
+    # try and figure out where we are installed.
+
+    #pygame could be installed in a weird location because of 
+    #  setuptools or something else.  The only sane way seems to be by trying
+    #  first to import it, and see where the imported one is.
+    # 
+    # Otherwise we might delete some files from another installation.
+    try:
+        import pygame.base
+        use_pygame = 1
+    except:
+        use_pygame = 0
+
+    if use_pygame:
+        install_path= os.path.split(pygame.base.__file__)[0]
+        extension_ext = os.path.splitext(pygame.base.__file__)[1]
+    else:
+        if not os.path.exists(data_path):
+            return
+
+        install_path = data_path
+
+        base_file = glob.glob(os.path.join(data_path, "base*"))
+        if not base_file:
+            return
+        
+        extension_ext = os.path.splitext(base_file[0])[1]
+
+
+
+    # here are the .so/.pyd files we need to ask to remove.
+    ext_to_remove = ["camera"]
+
+    # here are the .py/.pyo/.pyc files we need to ask to remove.
+    py_to_remove = ["color"]
+
+    os.path.join(data_path, 'color.py')
+    if os.name == "e32": # Don't warn on Symbian. The color.py is used as a wrapper.
+        py_to_remove = []
+
+
+
+    # See if any of the files are there.
+    extension_files = ["%s%s" % (x, extension_ext) for x in ext_to_remove]
+
+    py_files = ["%s%s" % (x, py_ext)
+                for py_ext in [".py", ".pyc", ".pyo"]
+                for x in py_to_remove]
+
+    files = py_files + extension_files
+
+    unwanted_files = []
+    for f in files:
+        unwanted_files.append( os.path.join( install_path, f ) )
+
+
+
+    ask_remove = []
+    for f in unwanted_files:
+        if os.path.exists(f):
+            ask_remove.append(f)
+
+    for f in ask_remove:
+        try:
+            print("trying to remove old file :%s: ..." %f)
+            os.remove(f)
+            print("Successfully removed :%s:." % f)
+        except:
+            print("FAILED to remove old file :%s:" % f)
+
+
+
+if "install" in sys.argv:
+    # remove some old files.
+    # only call after a successful install.  Should only reach here if there is
+    #   a successful install... otherwise setup() raises an error.
+    try:
+        remove_old_files()
+    except:
+        pass
+
+
+
 #if !defined(SCALE_HEADER)
 #define SCALE_HEADER
 
-#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || defined(MS_WIN32)
+#if (defined(__GNUC__) && ((defined(__x86_64__) && !defined(_NO_MMX_FOR_X86_64)) || defined(__i386__))) || defined(MS_WIN32)
 #define SCALE_MMX_SUPPORT
 
 /* These functions implement an area-averaging shrinking filter in the X-dimension.
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.