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