Hello community, here is the log from the commit of package ltxml for openSUSE:Factory checked in at 2011-12-21 10:01:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ltxml (Old) and /work/SRC/openSUSE:Factory/.ltxml.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ltxml", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/ltxml/ltxml.changes 2011-09-23 02:12:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ltxml.new/ltxml.changes 2011-12-21 10:01:27.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Dec 19 13:22:14 UTC 2011 - [email protected] + +- update PyLTXML from upstream URL + +------------------------------------------------------------------- +Thu Dec 1 16:46:49 UTC 2011 - [email protected] + +- add automake as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ltxml.spec ++++++ --- /var/tmp/diff_new_pack.NT0NtN/_old 2011-12-21 10:01:28.000000000 +0100 +++ /var/tmp/diff_new_pack.NT0NtN/_new 2011-12-21 10:01:28.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package ltxml (Version 1.2.7) +# spec file for package ltxml # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,18 +15,17 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: ltxml +BuildRequires: automake BuildRequires: zlib-devel Summary: LT XML: An Integrated Set of XML Tools -Version: 1.2.7 -Release: 139 +License: GPL-2.0+ Group: Productivity/Publishing/XML +Version: 1.2.7 +Release: 0 Requires: python #Provides: -License: GPL v2 or later Url: http://www.ltg.ed.ac.uk/software/ltxml/ Source0: ftp://ftp.cogsci.ed.ac.uk/pub/LTXML/ltxml-%{version}.tar.gz %define pyltxml PyLTXML-1.3.tar.gz @@ -62,9 +61,7 @@ Richard Tobin <[email protected]> %package devel -License: GPL v2 or later Summary: Include Files and Libraries mandatory for Development -Group: Productivity/Publishing/XML Requires: ltxml #Provides: ++++++ PyLTXML-1.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLTXML-1.3/00INSTALL new/PyLTXML-1.3/00INSTALL --- old/PyLTXML-1.3/00INSTALL 2002-08-22 11:52:12.000000000 +0200 +++ new/PyLTXML-1.3/00INSTALL 2007-05-02 13:20:48.000000000 +0200 @@ -2,7 +2,7 @@ This distribution requires LT XML to be installed before you can build and install it. Source and some binary distributions of LT XML are -available from http://www.ltg.ed.ac.uk/software/xml/. +available from http://www.ltg.ed.ac.uk/software/ltxml . To install, simply run @@ -19,6 +19,12 @@ to build the system and see what installing it would do, without actually doing the installation. +For WIN32 systems, if you have the MSVC compiler installed, the above +will work. Otherwise, if you have cygwin installed with mingw, do the +following: + + > python setup.py build --compiler=mingw32 install + You will have to edit setup.py if you have installed LT XML in a non-default location, changing the appropriate values for incldirs and libdirs. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLTXML-1.3/00README new/PyLTXML-1.3/00README --- old/PyLTXML-1.3/00README 2002-08-22 11:52:12.000000000 +0200 +++ new/PyLTXML-1.3/00README 2007-05-02 13:58:20.000000000 +0200 @@ -1,5 +1,5 @@ PyLTXML -- The LT-XML Python Interface - Release 1.3, August 2002 + Release 1.3, May 2007 Richard Tobin, Henry S. Thompson and Chris Brew Introduction @@ -7,7 +7,7 @@ This package interfaces our high-performance validating C API for XML to Python. It is known to work with Python 1.6 and later, but the -binary version of this release is specialised to Python 2.2. It +binary version of this release is specialised to Python 2.4. It requires the LT-XML version 1.2. Please report any difficulties or bugs which you encounter and we will do our best to deal with them. @@ -28,6 +28,9 @@ one of the binary distributions far enough to be reading this, your installation is almost certainly complete already. +[Note that the rest of this documentation is somewhat out-of-date -- + the source code of NSLintermodule.c is your friend!] + The module PyLTXML defines several types, functions, constants and one error. @@ -241,6 +244,6 @@ documentation pointers for it. This software was downloaded from - ftp://www.ltg.ed.ac.uk/pub/LTXML/PyLTXML-1.3.... + ftp://www.ltg.ed.ac.uk/pub/LTXML/PyLTXML-1.8.... Send comments or questions to [email protected] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLTXML-1.3/NSLintermodule.c new/PyLTXML-1.3/NSLintermodule.c --- old/PyLTXML-1.3/NSLintermodule.c 2002-11-04 14:47:31.000000000 +0100 +++ new/PyLTXML-1.3/NSLintermodule.c 2004-07-01 13:02:58.000000000 +0200 @@ -1,4 +1,4 @@ -/* $Id: NSLintermodule.c,v 1.47 2002/11/02 19:27:59 ht Exp $*/ +/* $Id: NSLintermodule.c,v 1.56 2004/07/01 11:02:58 ht Exp $*/ #include <stdarg.h> #include "Python.h" #include <assert.h> @@ -31,7 +31,7 @@ #define PyCharStar_FromLatin1 PyString_FromString #define Free(obj) #else -#define PyCharStar_FromCharStar PyUnicode_FromUnicode +#define PyCharStar_FromCharStar(str, len) PyUnicode_DecodeUTF16((char*)(str), 2*(len), NULL, NULL) #define IsCharStar(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define CheckCharStar(obj,aname,fname) if (!PyUnicode_Check(obj) && !PyString_Check(obj)) { \ return error(aname "argument to" fname " not a string (8- or 16-bit)"); \ @@ -422,7 +422,7 @@ } value; const Char *label; const Char *llabel; - const char8 *nsuri; + const Char *nsuri; const Char *prefix; PyObject *body; /* PyString, cache */ PyObject *pLabel; /* PyString, cache */ @@ -768,6 +768,7 @@ static PyObject *sddNames[3]; static PyObject *CEncNames[CE_enum_count]; static PyObject *CEncDict; +static PyObject *XMLVersions[3]; static PyObject *Doctype_Getattr(PyObject *self, char *name) { DoctypeObject *this=((DoctypeObject *)self); @@ -1028,7 +1029,7 @@ if(dtype == Py_None) dtype = NULL; else if(dtype->ob_type != &DoctypeType) - return error("Second arg to OpenStream is not a Doctype"); + return error("Second arg to OpenURL is not a Doctype"); } else { @@ -1059,27 +1060,36 @@ static PyObject *pOpenStream(PyObject *self, PyObject *args) { int type, encoding; - PyObject *pfile, *dtype; + PyObject *pfile, *dtype, *baseURI; NSL_File file; - if(PyArg_ParseTuple(args, "OOii", &pfile, &dtype, &encoding, &type)) - { - if(dtype == Py_None) - dtype = NULL; - else if(dtype->ob_type != &DoctypeType) - return error("Second arg to OpenStream is not a Doctype"); + if(PyArg_ParseTuple(args, "OOOii", &pfile, &dtype, &baseURI, + &encoding, &type)) { + if(baseURI == Py_None) { + baseURI = NULL; + } + else { + CheckCharStar(baseURI,"third","OpenStream"); + } } - else - { + else { + PyErr_Clear(); + baseURI = NULL; + if (! PyArg_ParseTuple(args, "OOii", &pfile, &dtype, &encoding, &type)) { PyErr_Clear(); if(PyArg_ParseTuple(args, "Oii", &pfile, &encoding, &type)) - dtype = NULL; + dtype = NULL; else - return NULL; + return NULL; + } } if(!PyFile_Check(pfile)) return error("First arg to FOpen is not a file"); + if(dtype == Py_None) + dtype = NULL; + else if(dtype->ob_type != &DoctypeType) + return error("Second arg to OpenStream is not a Doctype"); if(type & ~(NSL_write_flags|NSL_read_flags)) return error("Bad NSL file type 0x%x", type); @@ -1092,7 +1102,8 @@ dtype ? ((DoctypeObject *)dtype)->doctype : NULL, type, encoding, - PyString_AsString(PyFile_Name(pfile))); + PyString_AsString(baseURI ? baseURI : + PyFile_Name(pfile))); if(!file) return error("Can't open file"); @@ -1293,6 +1304,14 @@ return this->doctype; }; }; + + if (strcmp(name, "XMLVersion") == 0) { + XMLVersion vv = file->pstate->xml_version; + PyObject *xv=XMLVersions[vv==XV_1_0?1:(vv==XV_1_1?2:0)]; + Py_INCREF(xv); + return xv; + }; + if(strcmp(name, "where") == 0) { /* Should not copy strings every time! XXX */ @@ -1570,6 +1589,9 @@ sddNames[0]=PyString_FromString("unspecified"); sddNames[1]=PyString_FromString("no"); sddNames[2]=PyString_FromString("yes"); + XMLVersions[0]=Py_None; + XMLVersions[1]=PyString_FromString("1.0"); + XMLVersions[2]=PyString_FromString("1.1"); CEncDict=PyDict_New(); for (i=0;i<CE_enum_count;i++) { CEncNames[i]=PyString_FromString(CharacterEncodingName[i]); @@ -1824,7 +1846,8 @@ if (this->type == NSL_start_bit || this->type == NSL_end_bit || this->type == NSL_empty_bit) { if (this->nsuri) { - this->pNsuri = PyCharStar_FromLatin1(this->nsuri); + this->pNsuri = PyCharStar_FromCharStar(this->nsuri, + Strlen(this->nsuri)); if (!this->pNsuri) { Py_INCREF(Py_None); this->pNsuri = Py_None; @@ -2021,7 +2044,8 @@ if(strcmp(name, "nsuri") == 0) { if (!this->nsuri) { if (item->nsuri) { - this->nsuri = PyString_FromString(item->nsuri); + this->nsuri = PyCharStar_FromCharStar(item->nsuri, + Strlen(item->nsuri)); } else { Py_INCREF(Py_None); @@ -2150,7 +2174,8 @@ /* undefining default namespace */ goto done; - uri = PyCharStar_FromLatin1(n->namespace->uri); + uri = PyCharStar_FromCharStar(n->namespace->nsname, + Strlen(n->namespace->nsname)); if (!uri) { uri=Py_None; Py_INCREF(Py_None); @@ -2272,7 +2297,7 @@ static PyObject *pLookupPrefix(PyObject *self, PyObject *args) { PyObject *pitem, *pprefix; - const char8 *uri; + const Char *uri; Char *prefix; if(!PyArg_ParseTuple(args, "OO", &pitem, &pprefix)) @@ -2290,7 +2315,7 @@ Free(prefix); if(uri) - return PyString_FromString(uri); + return PyCharStar_FromCharStar(uri,Strlen(uri)); else { Py_INCREF(Py_None); @@ -2568,7 +2593,8 @@ Free(this->source); }; - free(self); + PyObject_FREE(self); + } static void Bit_Dealloc(PyObject *self) { @@ -2602,7 +2628,8 @@ Py_XDECREF(bit->pLlabel); Py_XDECREF(bit->pNsuri); - free(self); + PyObject_FREE(self); + } static void Item_Dealloc(PyObject *self) { @@ -2638,7 +2665,8 @@ Py_XDECREF(item->nsuri); Py_XDECREF(item->nsdict); Py_DECREF(item->data); - free(self); + PyObject_FREE(self); + } static void OOB_Dealloc(PyObject *self) { @@ -2662,7 +2690,8 @@ Py_DECREF(oob->sData); Py_DECREF(oob->type); - free(self); + PyObject_FREE(self); + } static void ERef_Dealloc(PyObject *self) { @@ -2676,7 +2705,8 @@ Py_DECREF(er->userdata); Py_DECREF(er->name); - free(self); + PyObject_FREE(self); + } static void Doctype_Dealloc(PyObject *self) { @@ -2692,7 +2722,8 @@ Py_DECREF(this->parameterEntities); Py_DECREF(this->name); - free(self); + PyObject_FREE(self); + } static void ContentParticle_Dealloc(PyObject *self) { @@ -2706,7 +2737,8 @@ Py_DECREF(this->name); Py_DECREF(this->children); - free(self); + PyObject_FREE(self); + } static void ElementType_Dealloc(PyObject *self) { @@ -2720,7 +2752,8 @@ Py_DECREF(this->particle); Py_DECREF(this->attrDefns); - free(self); + PyObject_FREE(self); + } static void AttrDefn_Dealloc(PyObject *self) { @@ -2736,7 +2769,8 @@ Py_DECREF(this->allowedValues); Py_DECREF(this->defValue); - free(self); + PyObject_FREE(self); + } static void Query_Dealloc(PyObject *self) { @@ -2750,7 +2784,8 @@ Py_DECREF(this->userdata); - free(self); + PyObject_FREE(self); + } static PyObject *pAutoFreeNSLObjects(PyObject *self, PyObject *args) @@ -2843,7 +2878,8 @@ PyTuple_SET_ITEM(pair,0,name); PyTuple_SET_ITEM(pair,1,PyCharStar_FromCharStar(attr->value.string,Strlen(attr->value.string))); if (attr->nsuri) { - PyTuple_SET_ITEM(pair,2,PyString_FromString(attr->nsuri)); + PyTuple_SET_ITEM(pair,2,PyCharStar_FromCharStar(attr->nsuri, + Strlen(attr->nsuri))); PyTuple_SET_ITEM(pair,3,PyCharStar_FromCharStar(attr->lname, Strlen(attr->lname))); } @@ -2865,6 +2901,7 @@ static char16 *PyUnicodeOrString_AsZTUnicode(PyObject *strOrUni) { if PyUnicode_Check(strOrUni) { +#if Py_UNICODE_SIZE == 2 int size=PyUnicode_GET_DATA_SIZE(strOrUni); char16 *res=malloc(size+sizeof(char16)); if (!res) { @@ -2872,6 +2909,17 @@ }; memcpy(res,PyUnicode_AS_UNICODE(strOrUni),size); res[PyUnicode_GET_SIZE(strOrUni)]=(char16)0; +#else + int size=PyUnicode_GET_SIZE(strOrUni); + char16 *res=malloc((size+1)*sizeof(char16)); + Py_UNICODE *p=PyUnicode_AS_UNICODE(strOrUni); + Py_UNICODE c; + int i; + for ( i=0; i<size; i++ ) { + res[i]=(c = p[i]) > 65535?(char16)'?':(char16)c; + } + res[size]=(char16)0; +#endif return res; /* !!! Never Freed !!! */ } else { @@ -3015,6 +3063,33 @@ } /* $Log: NSLintermodule.c,v $ + Revision 1.56 2004/07/01 11:02:58 ht + added XMLVersion property to Files + + Revision 1.55 2004/01/27 12:32:24 ht + handle incoming 32-bit-wide PyUnicode + + Revision 1.54 2003/10/10 13:51:32 ht + use _correct_ python free on objects + + Revision 1.53 2003/10/10 13:24:36 ht + use python free on objects + + Revision 1.52 2003/09/02 15:46:02 ht + get arg checking for OpenStream right + + Revision 1.51 2003/09/01 18:15:03 ht + nsuri is 16 bits now + + Revision 1.50 2003/09/01 16:40:49 ht + cleanup unused var after error + + Revision 1.49 2003/09/01 14:08:35 ht + add 5-arg't version of OpenStream, with baseURI arg't + + Revision 1.48 2003/06/03 15:20:17 ht + work with 16- or 32-bit Python + Revision 1.47 2002/11/02 19:27:59 ht handle latin-1 NS URIs properly diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLTXML-1.3/PKG-INFO new/PyLTXML-1.3/PKG-INFO --- old/PyLTXML-1.3/PKG-INFO 2002-11-04 15:50:30.000000000 +0100 +++ new/PyLTXML-1.3/PKG-INFO 2008-01-16 13:18:25.000000000 +0100 @@ -2,7 +2,7 @@ Name: PyLTXML Version: 1.3 Summary: Python binding for LT XML -Home-page: http://www.ltg.ed.ac.uk/software/xml +Home-page: http://www.ltg.ed.ac.uk/software/ltxml Author: Henry S. Thompson Author-email: [email protected] License: GPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLTXML-1.3/example/simple.py new/PyLTXML-1.3/example/simple.py --- old/PyLTXML-1.3/example/simple.py 2002-08-23 17:03:44.000000000 +0200 +++ new/PyLTXML-1.3/example/simple.py 2004-10-06 17:37:13.000000000 +0200 @@ -10,7 +10,7 @@ infile = FOpen(sys.stdin, NSL_read) -print (infile.doctype.encoding,infile.doctype.xencoding) +print (infile.doctype.encoding,infile.doctype.xencoding,infile.XMLVersion) query = ParseQuery(infile.doctype,toplevelQuery) subQuery = ParseQuery(infile.doctype,detailQuery) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLTXML-1.3/setup.py new/PyLTXML-1.3/setup.py --- old/PyLTXML-1.3/setup.py 2002-11-04 15:50:20.000000000 +0100 +++ new/PyLTXML-1.3/setup.py 2008-01-11 15:26:31.000000000 +0100 @@ -1,46 +1,39 @@ """Distutils setup for PyLTXML - $Id: setup.py,v 1.8 2002/08/23 14:38:07 ht Exp $""" + $Id: setup.py,v 1.13 2007/12/31 15:18:18 ht Exp $""" import sys from distutils.core import setup, Extension -from distutils.command.install_data import install_data +from distutils import sysconfig -#data installer with improved intelligence over distutils. -#data files are copied into the project directory instead -#of willy-nilly -class smart_install_data(install_data): - def run(self): - #need to change self.install_dir to the actual library dir - install_cmd = self.get_finalized_command('install') - self.install_dir = getattr(install_cmd, 'install_lib') - return install_data.run(self) - -datafiles=[('PyLTXML/example', - ['example/small.xml', +datafiles= ['example/small.xml', 'example/gscore.dtd', - 'example/simple.py'])] # only works for bdist and friends + 'example/simple.py'] # only works for bdist and friends if sys.platform.find("win32",0,5)==0: - incldirs=['C:\Program Files\HCRC LTG\LT XML\include'] - libdirs=['C:\Program Files\HCRC LTG\LT XML\lib'] + incldirs=['C:\\Program Files\\msys\\1.0\\include\\ltxml12','C:\\Program Files\\msys\\1.0\\include'] + libdirs=['C:\\Program Files\\msys\\1.0\\lib','C:\\Program Files\\MinGW\\lib\\hack'] libs=['ltapi12','ltstd12'] macros=[('FOR_LT', '1'),('CHAR_SIZE', '16'), ('WIN32', '1')] extra_link_args=[] extra_compile_args=[] - datafiles.append(('PyLTXML', - ['c:\\Program Files\\HCRC LTG\\LT XML\\bin\ltstd12.dll', - 'c:\\Program Files\\HCRC LTG\\LT XML\\bin\ltapi12.dll'])) + data_files=[( "Lib/site-packages/PYLTXML/example", datafiles), + ( "Lib/site-packages/PYLTXML", + ['c:\\Program Files\\msys\\1.0\\lib\\ltstd12.dll', + 'c:\\Program Files\\msys\\1.0\\lib\\ltapi12.dll', + 'd:\\work\\LTXML\\zlib-1.2.3\\zlib1.dll'])] platform="WIN32" else: incldirs=['/usr/local/include/ltxml12'] libdirs=['/usr/local/lib'] libs=['ltapi12','ltstd12', 'z'] - macros=[('FOR_LT', '1')] + macros=[('FOR_LT', '1')] # ,('ALLOC_DEBUG', '1') + data_files=[( sysconfig.get_python_lib() + "/PyLTXML/example", + datafiles)] if sys.platform.find("sunos",0,5)==0: extra_link_args=['-mimpure-text'] extra_compile_args=['-mimpure-text'] @@ -65,13 +58,12 @@ description='Python binding for LT XML', author='Henry S. Thompson', author_email='[email protected]', - url="http://www.ltg.ed.ac.uk/software/xml", + url="http://www.ltg.ed.ac.uk/software/ltxml", license="GPL", long_description="""Exposes a Python-level interface to the LTG's high-speed C-language validating XML parser. See 00README for details""", platforms=[platform], packages=['PyLTXML'], - cmdclass = {'install_data': smart_install_data}, - data_files=datafiles, + data_files=data_files, ext_modules=[pyltxml]) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
