Commits

Lenard Lindstrom committed 1ed2151

Fixed transform build and test problems

Comments (0)

Files changed (2)

     cmdclass['build_ext'] = WinBuildExt
 
     # Add the precompiled smooth scale MMX functions to transform.
-    for e in extensions:
-        if e.name == 'transform':
-            e.extra_objects.append('obj\\win32\\scale_mmx.obj')
-            e.sources.remove('scale_mmx.c')
-
-#else:
-    # Add smooth scale MMX functions source file to transform extension. This
-    # file is safe for non-Pentium or non-GCC builds as it will produce an
-    # empty object file.
-#    for e in extensions:
-#        if e.name == 'transform':
-#            e.sources.append('scale_mmx.c')
+    def replace_scale_mmx():
+        for e in extensions:
+            if e.name == 'transform':
+                e.extra_objects.append(
+                    os.path.join('obj', 'win32', 'scale_mmx.obj'))
+                for i in range(len(e.sources)):
+                    if e.sources[i].endswith('scale_mmx.c'):
+                        del e.sources[i]
+                        return
+    replace_scale_mmx()
 
 
 #clean up the list of extensions

test/transform_test.py

     def test_get_smoothscale_backend(self):
         filter_type = pygame.transform.get_smoothscale_backend()
         self.failUnless(filter_type in ['GENERIC', 'MMX', 'SSE'])
-        #What is this testing?
-        self.failUnless(filter_type == 'GENERIC' or platform.machine() in ['i386', 'i686', ''])
-        
+        # It would be nice to test if a non-generic type corresponds to an x86
+        # processor. But there is no simple test for this. platform.machine()
+        # returns process version specific information, like 'i686'.
+       
     def todo_test_chop(self):
 
         # __doc__ (as of 2008-08-02) for pygame.transform.chop: