1. Tarek Ziadé
  2. distribute

Source

distribute / distribute_setup.py

The branch '0.6-maintenance' does not exist.
Diff from to

File distribute_setup.py

  • Ignore whitespace
         self.extract(tarinfo, path)
 
     # Reverse sort directories.
-    def sorter(dir1, dir2):
-        return cmp(dir1.name, dir2.name)
-    directories.sort(sorter)
-    directories.reverse()
+    if sys.version_info < (2, 4):
+        def sorter(dir1, dir2):
+            return cmp(dir1.name, dir2.name)
+        directories.sort(sorter)
+        directories.reverse()
+    else:
+        directories.sort(key=operator.attrgetter('name'), reverse=True)
 
     # Set correct owner, mtime and filemode on directories.
     for tarinfo in directories: