Source

suds python 3 patches / setup

# HG changeset patch
# Parent efef5c2581306e04c4119b818d4d302ca7291ecc
Use 2to3 fixers when building via 'setup.py'.

This adds a dependency on the Python 3 version of setuptools when running under
Python 3. This should not be a problem since the Python 2 version also depends
on setuptools.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,6 +18,7 @@
 
 import os
 import os.path
+import sys
 from setuptools import setup, find_packages
 
 # Setup documentation incorrectly states that it will search for packages
@@ -55,6 +56,10 @@
 #     they are already installed).
 exec(open(os.path.join("suds", "version.py"), "rt").read())
 
+extra = {}
+if sys.version_info >= (3,0):
+    extra['use_2to3'] = True
+
 setup(
     name="suds",
     version=__version__,
@@ -65,4 +70,5 @@
     maintainer_email="jortel@redhat.com",
     packages=find_packages(exclude=["tests"]),
     url="https://fedorahosted.org/suds",
+    **extra
 )