python-zmq/python-zmq-os-walk.patch

31 lines
905 B
Diff

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
#-----------------------------------------------------------------------------