PyXML 0.8.4 and expat byteorder

Bob Ippolito <[email protected]>
Newsgroups gmane.comp.python.apple,gmane.comp.python.xml
Message-ID <[email protected]>
Here's the PyXML patch that gets expat byteorder from pyconfig.h.  I  
don't know who the maintainer is nor do I have any interest in  
subscribing to xml-sig (this CC will probably bounce, or get stuck in  
mod queue for days/weeks/forever).  If you give a damn about PyXML  
please make sure to get the patch to the right person.

I've never even installed the 4Suite stuff, so I'm not going to put  
together a patch for that.  Such a patch should be roughly the same  
as this one.

-bob

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
PyXML-0.8.4-byteorder.patch (application/octet-stream, 1002 B)
=== extensions/expat/lib/expat_config.h
==================================================================
--- extensions/expat/lib/expat_config.h	(revision 65)
+++ extensions/expat/lib/expat_config.h	(local)
@@ -0,0 +1,9 @@
+#include "Python.h"
+#ifdef BYTEORDER
+#undef BYTEORDER
+#endif
+#ifdef WORDS_BIGENDIAN
+#define BYTEORDER 4321
+#else
+#define BYTEORDER 1234
+#endif
=== setup.py
==================================================================
--- setup.py	(revision 65)
+++ setup.py	(local)
@@ -97,15 +97,10 @@
     libraries = ['expat']
     library_dirs = [os.path.join(expat_prefix, "lib")]
 else:
-    # To build expat 1.95.x, we need to find out the byteorder
-    if sys.byteorder == "little":
-        xmlbo = "1234"
-    else:
-        xmlbo = "4321"
     define_macros = [
         ('XML_NS', '1'),
         ('XML_DTD', '1'),
-        ('BYTEORDER', xmlbo),
+        ('HAVE_EXPAT_CONFIG_H', '1'),
         ('XML_CONTEXT_BYTES','1024'),
         ]
     if sys.platform == "win32":
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.