You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
905 B
31 lines
905 B
commit 12bca65badafebf0d45864b2011c32543be271d4
|
|
Author: Thomas Spura <tomspur@fedoraproject.org>
|
|
Date: Tue Aug 3 12:56:54 2010 +0200
|
|
|
|
s/os.path.walk/os.walk/g in python 3
|
|
|
|
When running python3, there is no os.path.walk() anymore.
|
|
It's renamed as os.walk(), so prefer the later and fall back to the
|
|
first.
|
|
|
|
Signed-off-by: Thomas Spura <tomspur@fedoraproject.org>
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 6c765a6..2fe9055 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -30,7 +30,12 @@ from distutils.extension import Extension
|
|
|
|
from unittest import TextTestRunner, TestLoader
|
|
from glob import glob
|
|
-from os.path import splitext, basename, join as pjoin, walk
|
|
+from os.path import splitext, basename, join as pjoin
|
|
+
|
|
+try:
|
|
+ from os import walk
|
|
+except ImportError:
|
|
+ from os.path import walk
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|