suds python 3 patches / extract-version-information

# HG changeset patch
# Parent 99648b8a89bfdb3a3ef781788f97b7dd0b3434be
Extract suds version information into a separate module.

This change allows the script to work without having to import the
suds package, thus allowing us to:
  * Maintain our suds library sources in Python 2 compatible but possibly Python
    3 incompatible format (whatever gets imported by needs to be
    compatible with the Python version running that script).
  * Have install any missing suds library depencencies instead of
    depending on them itself and requiring them to be installed manually before

diff --git a/ b/
--- a/
+++ b/
@@ -16,12 +16,24 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 # written by: Jeff Ortel ( )
-import suds
+import os.path
 from setuptools import setup, find_packages
+# Load the suds library version information directly into this module without
+# having to import the whole suds library itself. Importing the suds package
+# would have caused problems like the following:
+#   * Forcing the imported package module to be Python 3 compatible without any
+#     lib2to3 fixers first being run on it (since such fixers get run only
+#     later as a part of the setup procedure).
+#   * Making the setup module depend on the package module's dependencies, thus
+#     forcing the user to install them manually (since the setup procedure that
+#     is supposed to install them automatically will not be able to run unless
+#     they are already installed).
+exec(open(os.path.join("suds", ""), "rt").read())
-    version=suds.__version__,
+    version=__version__,
     description="Lightweight SOAP client",
     author="Jeff Ortel",
diff --git a/suds/ b/suds/
--- a/suds/
+++ b/suds/
@@ -23,8 +23,7 @@
 # Project properties
-__version__ = '0.4.1'
-__build__="(beta) R705-20101207"
+from version import __build__, __version__
 # Exceptions
diff --git a/suds/ b/suds/
new file mode 100644
--- /dev/null
+++ b/suds/
@@ -0,0 +1,25 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the (LGPL) GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 3 of the
+# License, or (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Library Lesser General Public License for more details at
+# ( ).
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+Module containing the library's version information. This version information
+has been extracted into a separate file so it can be read from the
+script without having to import the suds package itself. See the
+script for more detailed information.
+__version__ = '0.4.1'
+__build__ = "(beta) R705-20101207"