54b74e4
commit 12bca65badafebf0d45864b2011c32543be271d4
54b74e4
Author: Thomas Spura <tomspur@fedoraproject.org>
54b74e4
Date:   Tue Aug 3 12:56:54 2010 +0200
54b74e4
54b74e4
    s/os.path.walk/os.walk/g in python 3
54b74e4
    
54b74e4
    When running python3, there is no os.path.walk() anymore.
54b74e4
    It's renamed as os.walk(), so prefer the later and fall back to the
54b74e4
    first.
54b74e4
    
54b74e4
    Signed-off-by: Thomas Spura <tomspur@fedoraproject.org>
54b74e4
54b74e4
diff --git a/setup.py b/setup.py
54b74e4
index 6c765a6..2fe9055 100644
54b74e4
--- a/setup.py
54b74e4
+++ b/setup.py
54b74e4
@@ -30,7 +30,12 @@ from distutils.extension import Extension
54b74e4
 
54b74e4
 from unittest import TextTestRunner, TestLoader
54b74e4
 from glob import glob
54b74e4
-from os.path import splitext, basename, join as pjoin, walk
54b74e4
+from os.path import splitext, basename, join as pjoin
54b74e4
+
54b74e4
+try:
54b74e4
+    from os import walk
54b74e4
+except ImportError:
54b74e4
+    from os.path import walk
54b74e4
 
54b74e4
 
54b74e4
 #-----------------------------------------------------------------------------