[python26-PyXML/el5/master] - First Offical Fedora EPEL Release. - Remove private copy of pyexpat, #614911 - Enable regression t

stevetraylen stevetraylen at fedoraproject.org
Mon Nov 29 18:23:46 UTC 2010


commit f3dc564071a6fc3f4400e876c8be4aac64e659ef
Author: Steve Traylen <steve.traylen at cern.ch>
Date:   Mon Nov 29 19:23:39 2010 +0100

    - First Offical Fedora EPEL Release.
    - Remove private copy of pyexpat, #614911
    - Enable regression tests in check section.

 .gitignore                                       |    1 +
 PyXML-0.7.1-intern.patch                         |   18 ++
 PyXML-0.8.4-cvs20041111-python2.4-backport.patch |   19 ++
 PyXML-0.8.4-python2.6.patch                      |   42 +++
 PyXML-memmove.patch                              |   18 ++
 python26-PyXML.spec                              |  299 ++++++++++++++++++++++
 sources                                          |    1 +
 7 files changed, 398 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..39d0c46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/PyXML-0.8.4.tar.gz
diff --git a/PyXML-0.7.1-intern.patch b/PyXML-0.7.1-intern.patch
new file mode 100644
index 0000000..3719391
--- /dev/null
+++ b/PyXML-0.7.1-intern.patch
@@ -0,0 +1,18 @@
+--- PyXML-0.8.2/xml/sax/expatreader.py.intern	2003-01-25 14:30:58.000000000 +0100
++++ PyXML-0.8.2/xml/sax/expatreader.py	2003-06-25 23:24:55.000000000 +0200
+@@ -243,13 +243,12 @@
+ 
+     def reset(self):
+         if self._namespaces:
+-            self._parser = expat.ParserCreate(None, " ",
+-                                              intern=self._interning)
++            self._parser = expat.ParserCreate(None, " ")
+             self._parser.namespace_prefixes = 1
+             self._parser.StartElementHandler = self.start_element_ns
+             self._parser.EndElementHandler = self.end_element_ns
+         else:
+-            self._parser = expat.ParserCreate(intern = self._interning)
++            self._parser = expat.ParserCreate()
+             self._parser.StartElementHandler = self.start_element
+             self._parser.EndElementHandler = self.end_element
+ 
diff --git a/PyXML-0.8.4-cvs20041111-python2.4-backport.patch b/PyXML-0.8.4-cvs20041111-python2.4-backport.patch
new file mode 100644
index 0000000..f37ecc1
--- /dev/null
+++ b/PyXML-0.8.4-cvs20041111-python2.4-backport.patch
@@ -0,0 +1,19 @@
+diff -ur PyXML-0.8.4.orig/xml/sax/saxutils.py PyXML-0.8.4/xml/sax/saxutils.py
+--- PyXML-0.8.4.orig/xml/sax/saxutils.py	2004-11-11 19:02:46.097146160 +0100
++++ PyXML-0.8.4/xml/sax/saxutils.py	2004-11-11 19:07:44.566771880 +0100
+@@ -514,10 +514,11 @@
+ 
+     if source.getByteStream() is None:
+         sysid = source.getSystemId()
+-        if os.path.isfile(sysid):
+-            basehead = os.path.split(os.path.normpath(base))[0]
+-            source.setSystemId(os.path.join(basehead, sysid))
+-            f = open(sysid, "rb")
++        basehead = os.path.dirname(os.path.normpath(base))
++        sysidfilename = os.path.join(basehead, sysid)
++        if os.path.isfile(sysidfilename):
++            source.setSystemId(sysidfilename)
++            f = open(sysidfilename, "rb")
+         else:
+             source.setSystemId(urlparse.urljoin(base, sysid))
+             f = urllib2.urlopen(source.getSystemId())
diff --git a/PyXML-0.8.4-python2.6.patch b/PyXML-0.8.4-python2.6.patch
new file mode 100644
index 0000000..7a54ac5
--- /dev/null
+++ b/PyXML-0.8.4-python2.6.patch
@@ -0,0 +1,42 @@
+diff -up PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py.patch PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py
+--- PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py.patch	2008-12-24 06:35:27.000000000 +0100
++++ PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py	2008-12-24 06:35:39.000000000 +0100
+@@ -24,8 +24,8 @@ class ParsedAbbreviatedAbsoluteLocationP
+         self._rel = rel
+         nt = ParsedNodeTest.ParsedNodeTest('node', '')
+         ppl = ParsedPredicateList.ParsedPredicateList([])
+-        as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+-        self._step = ParsedStep.ParsedStep(as, nt, ppl)
++        as_ = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
++        self._step = ParsedStep.ParsedStep(as_, nt, ppl)
+         return
+ 
+     def evaluate(self, context):
+diff -up PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py.patch PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py
+--- PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py.patch	2008-12-24 06:37:27.000000000 +0100
++++ PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py	2008-12-24 06:37:48.000000000 +0100
+@@ -28,8 +28,8 @@ class ParsedAbbreviatedRelativeLocationP
+         self._right = right
+         nt = ParsedNodeTest.ParsedNodeTest('node','')
+         ppl = ParsedPredicateList.ParsedPredicateList([])
+-        as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+-        self._middle = ParsedStep.ParsedStep(as, nt, ppl)
++        as_ = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
++        self._middle = ParsedStep.ParsedStep(as_, nt, ppl)
+ 
+     def evaluate(self, context):
+         res = []
+diff -ru PyXML-0.8.4.orig/xml/xslt/Stylesheet.py PyXML-0.8.4/xml/xslt/Stylesheet.py
+--- PyXML-0.8.4/xml/xslt/Stylesheet.py.patch	2009-03-03 08:20:01.000000000 +0000
++++ PyXML-0.8.4/xml/xslt/Stylesheet.py	2009-03-03 08:21:18.000000000 +0000
+@@ -373,8 +373,8 @@
+ 
+         #Attribute sets
+         attribute_sets = filter(lambda x: x.nodeType == Node.ELEMENT_NODE and (x.namespaceURI, x.localName) == (XSL_NAMESPACE, 'attribute-set'), self.childNodes)
+-        for as in attribute_sets:
+-            as.instantiate(context, processor)
++        for as_ in attribute_sets:
++            as_.instantiate(context, processor)
+         overridden_params = {}
+         for k in topLevelParams.keys():
+             if type(k) != types.TupleType:
diff --git a/PyXML-memmove.patch b/PyXML-memmove.patch
new file mode 100644
index 0000000..7e8b4d1
--- /dev/null
+++ b/PyXML-memmove.patch
@@ -0,0 +1,18 @@
+--- PyXML-0.8.4/extensions/expat/lib/xmlparse.c.lr	2006-07-27 15:08:44.000000000 +0200
++++ PyXML-0.8.4/extensions/expat/lib/xmlparse.c	2006-07-27 15:09:03.000000000 +0200
+@@ -67,15 +67,6 @@
+ /* Round up n to be a multiple of sz, where sz is a power of 2. */
+ #define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1))
+ 
+-/* Handle the case where memmove() doesn't exist. */
+-#ifndef HAVE_MEMMOVE
+-#ifdef HAVE_BCOPY
+-#define memmove(d,s,l) bcopy((s),(d),(l))
+-#else
+-#error memmove does not exist on this platform, nor is a substitute available
+-#endif /* HAVE_BCOPY */
+-#endif /* HAVE_MEMMOVE */
+-
+ #include "internal.h"
+ #include "xmltok.h"
+ #include "xmlrole.h"
diff --git a/python26-PyXML.spec b/python26-PyXML.spec
new file mode 100644
index 0000000..4135da8
--- /dev/null
+++ b/python26-PyXML.spec
@@ -0,0 +1,299 @@
+%define __python /usr/bin/python2.6
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+# Fix byte-compilation:
+%define __os_install_post %{__python26_os_install_post}
+
+
+Summary: XML libraries for python
+Name: python26-PyXML
+Version: 0.8.4
+Release: 23%{?dist}
+Source: http://prdownloads.sourceforge.net/pyxml/PyXML-%{version}.tar.gz
+Patch0: PyXML-0.7.1-intern.patch
+Patch1: PyXML-0.8.4-cvs20041111-python2.4-backport.patch
+Patch2: PyXML-memmove.patch
+Patch3: PyXML-0.8.4-python2.6.patch
+
+License: MIT and Python and ZPLv1.0 and BSD
+Group: Development/Libraries
+URL: http://pyxml.sourceforge.net/topics/
+BuildRequires: expat-devel dos2unix
+BuildRequires: python26-devel
+BuildRequires: python26-test
+BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+
+BuildRequires: python26-distribute
+
+%description
+An XML package for Python.  The distribution contains a
+validating XML parser, an implementation of the SAX and DOM
+programming interfaces and an interface to the Expat parser.
+
+%prep
+%setup -q -n PyXML-%{version}
+
+%patch0 -p1 -b .intern
+%patch1 -p1 -b .python2.4-backport
+%patch2 -p1
+%patch3 -p1
+
+
+# iconv to use utf8
+for file in CREDITS ANNOUNCE doc/xml-howto.txt doc/xml-ref.txt README; do
+  iconv -f iso8859-1 -t utf-8 -o tmp $file
+  mv tmp $file
+done
+
+# use Unix style EOL
+dos2unix doc/xmlproc/standard.css
+
+%build
+# build PyXML with system expat
+# Make sure we don't use local one
+rm -rf extensions/expat
+CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build  --with-xslt --with-libexpat=%{_usr}
+
+%install
+rm -fr %{buildroot}
+%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root=%{buildroot} --with-xslt
+
+# set executable bits
+for file in xslt/_4xslt.py dom/ext/c14n.py dom/html/GenerateHtml.py; do
+  chmod +x %{buildroot}/%{_libdir}/python2.6/site-packages/_xmlplus/$file
+done
+
+
+#Rename binaries
+mv %{buildroot}%{_bindir}/xmlproc_parse %{buildroot}%{_bindir}/xmlproc_parse26
+mv %{buildroot}%{_bindir}/xmlproc_val %{buildroot}%{_bindir}/xmlproc_val26
+
+#Edit some shebangs.
+sed -i 's|/usr/bin/env python|/usr/bin/python2.6|' %{buildroot}%{python_sitearch}/_xmlplus/dom/html/GenerateHtml.py
+sed -i 's|/usr/bin/env python|/usr/bin/python2.6|' %{buildroot}%{python_sitearch}/_xmlplus/dom/ext/c14n.py
+sed -i 's|/usr/bin/env python|/usr/bin/python2.6|' %{buildroot}%{python_sitearch}/_xmlplus/xslt/_4xslt.py
+
+#Fix the locales.
+# move messages files
+mkdir -p %{buildroot}/%{_datadir}/locale
+for file in dom/de dom/en_US dom/fr; do
+   mv %{buildroot}/%{_libdir}/python2.6/site-packages/_xmlplus/$file \
+   %{buildroot}/%{_datadir}/locale
+done
+%find_lang 4Suite %{name}
+
+# better to use symlink to python's pyexpat library
+# Resolves 614911
+pushd %{buildroot}/%{python_sitearch}/_xmlplus/parsers
+rm -rf pyexpat.so
+ln -s %{_libdir}/python2.6/lib-dynload/pyexpat.so pyexpat.so
+popd
+
+# remove some wrong executable bits.
+# to keep rpmlint happy.
+chmod 755 %{buildroot}/%{python_sitearch}/_xmlplus/parsers/sgmlop.so
+chmod 755 %{buildroot}/%{python_sitearch}/_xmlplus/utils/boolean.so
+
+%clean
+rm -rf %{buildroot}
+
+%check
+cd test
+PYTHONPATH=.. python26 regrtest.py -v
+
+
+%files  -f %{name}
+%defattr(-,root,root,-)
+%doc LICENCE ANNOUNCE CREDITS README README.dom README.pyexpat README.sgmlop TODO doc/*
+
+%{_bindir}/xmlproc_parse26
+%{_bindir}/xmlproc_val26
+%{python_sitearch}/*egg-info
+%{python_sitearch}/_xmlplus
+
+%changelog
+* Mon Nov 29 2010 Steve Traylen <steve.traylen at cern.ch> - 0.8.4-23
+- First Offical Fedora EPEL Release.
+- Remove private copy of pyexpat, #614911
+- Enable regression tests in check section.
+
+* Sat Nov 27 2010 Steve Traylen <steve.traylen at cern.ch> - 0.8.4-22
+- Add python26-devel as build requires.
+
+* Sun Apr 25 2010 Steve Traylen <steve.traylen at cern.ch> - 0.8.4-21
+- Adapt F14 .spec for use with python26 in EPEL5
+
+* Mon Mar 29 2010 Roman Rakus <rrakus at redhat.com> - 0.8.4-20
+- I mean python_sitearch
+
+* Mon Mar 29 2010 Roman Rakus <rrakus at redhat.com> - 0.8.4-19
+- Use python_sitelib macro
+
+* Mon Mar 22 2010 Roman Rakus <rrakus at redhat.com> - 0.8.4-18
+- Added missing build requires for dos2unix
+
+* Mon Mar 22 2010 Roman Rakus <rrakus at redhat.com> - 0.8.4-17
+- Merge review fixes (#226350)
+  Added executable bits
+  Converted EOL enconding
+  iconved text files
+  Handle locales files
+
+* Mon Nov 02 2009 Roman Rakus <rrakus at redhat.com> - 0.8.4-16
+- Use system expat library
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.4-15
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Tue Mar 03 2009 Caolán McNamara <caolanm at redhat.com> - 0.8.4-14
+- Another 'as' hiding in Stylesheet.py -> as_
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.4-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Wed Dec 24 2008 Johan Cwiklinski <johan AT x-tnd DOT be> - 0.8.4-12
+- Patch for 'as' reserved keyword (bug #477783)
+
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 0.8.4-11
+- Rebuild for Python 2.6
+
+* Mon Jul 14 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 0.8.4-10
+- fix license tag
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.8.4-9
+- Autorebuild for GCC 4.3
+
+* Fri Nov 02 2007 Jeffrey C. Ollie <jeff at ocjtech.us> - 0.8.4-8
+- Modify package so that it produces Python Eggs.
+
+* Tue Aug 21 2007 Florian La Roche <laroche at redhat.com> - 0.8.4-7
+- rebuild
+
+* Wed Apr 18 2007 Jeremy Katz <katzj at redhat.com> - 0.8.4-6
+- rebuild so that things aren't statically linked with libpython
+
+* Thu Dec  7 2006 Jeremy Katz <katzj at redhat.com> - 0.8.4-5
+- rebuild against python 2.5
+
+* Thu Jul 27 2006 Florian La Roche <laroche at redhat.com> - 0.8.4-4
+- don't check memmove
+
+* Mon Feb 13 2006 Jesse Keating <jkeating at redhat.com> - 0.8.4-3.2.2
+- rebump for build order issues during double-long bump
+
+* Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 0.8.4-3.2.1
+- bump again for double-long bug on ppc(64)
+
+* Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> - 0.8.4-3.2
+- rebuilt for new gcc4.1 snapshot and glibc changes
+
+* Fri Dec 09 2005 Jesse Keating <jkeating at redhat.com>
+- rebuilt
+
+* Wed Mar 02 2005 Karsten Hopp <karsten at redhat.de> 0.8.4-3
+- build with gcc-4
+
+* Fri Feb 25 2005 Miloslav Trmac <mitr at redhat.com> - 0.8.4-2
+- Rebuild, this should fix #149507
+
+* Tue Nov 30 2004 Miloslav Trmac <mitr at redhat.com> - 0.8.4-1
+- Update to PyXML-0.8.4
+
+* Thu Nov 11 2004 Miloslav Trmac <mitr at redhat.com> - 0.8.4-0.cvs20041111.1
+- Update to current CVS snapshot, Python 2.4b2 requires unreleased PyXML-0.8.4
+- Backport xml.sax.saxutils fix from Python 2.4b2
+
+* Mon Nov  8 2004 Jeremy Katz <katzj at redhat.com> - 0.8.3-7
+- rebuild against python 2.4
+
+* Wed Sep 29 2004 Miloslav Trmac <mitr at redhat.com> - 0.8.3-6
+- Don't omit xml.xslt and xml.xpath (#133879)
+
+* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
+- rebuilt
+
+* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com>
+- rebuilt
+
+* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
+- rebuilt
+
+* Tue Jan 13 2004 Thomas Woerner <twoerner at redhat.com> 0.8.3-3
+- removed lang tag: fixes #113268
+
+* Mon Nov 17 2003 Tim Waugh <twaugh at redhat.com> 0.8.3-2
+- Rebuild for Python 2.3.
+
+* Sat Aug 02 2003 Florian La Roche <Florian.LaRoche at redhat.de>
+- update to 0.8.3
+
+* Wed Jun 25 2003 Florian La Roche <Florian.LaRoche at redhat.de>
+- update to 0.8.2
+
+* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
+- rebuilt
+
+* Thu Feb  6 2003 Mihai Ibanescu <misa at redhat.com> 0.7.1-9
+- rebuilt against new python
+
+* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
+- rebuilt
+
+* Wed Dec 11 2002 Tim Powers <timp at redhat.com> 0.7.1-7
+- lib64'ize
+
+* Thu Aug 29 2002 Trond Eivind Glomsrød <teg at redhat.com> 0.7.1-6
+- Reenable expat. While most code works, some specify expat directly
+  and fails. Fix #72698, but there is still broken code there (it just 
+  goes on to other errors)
+
+* Tue Aug 27 2002 Trond Eivind Glomsrød <teg at redhat.com> 0.7.1-5
+- Disable expat support. Other parsers are included. Broken here, 
+  broken in 0.8.0. This fixes #72698
+
+* Fri Jun 28 2002 Trond Eivind Glomsrød <teg at redhat.com>
+- A fix for the expatreader
+
+* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
+- automated rebuild
+
+* Thu May 23 2002 Tim Powers <timp at redhat.com>
+- automated rebuild
+
+* Fri May 10 2002 Trond Eivind Glomsrød <teg at redhat.com> 0.7.1-1
+- 0.7.1
+
+* Tue Feb 26 2002 Trond Eivind Glomsrød <teg at redhat.com> 0.7-4
+- Rebuild
+
+* Mon Jan 21 2002 Trond Eivind Glomsrød <teg at redhat.com> 0.7-3
+- Remove xpath, xslt - use the ones in 4Suite
+- patch the build script, it's broken
+
+* Wed Jan 09 2002 Tim Powers <timp at redhat.com>
+- automated rebuild
+
+* Tue Jan  1 2002 Trond Eivind Glomsrød <teg at redhat.com> 0.7-1
+- PyXML 0.7
+
+* Wed Dec  5 2001 Trond Eivind Glomsrød <teg at redhat.com> 0.6.6-2
+- Add .pyo files
+- Don't hardcode python version
+
+* Tue Sep 18 2001 Trond Eivind Glomsrød <teg at redhat.com> 0.6.6-1
+- 0.6.6
+- Build for python 2.2
+
+* Tue Jul 24 2001 Trond Eivind Glomsrød <teg at redhat.com>
+- Add python-devel to BuildRequires (#49820)
+
+* Tue Jul 10 2001 Trond Eivind Glomsrød <teg at redhat.com>
+- Mark the locale-specific files as such
+
+* Thu Jun  7 2001 Trond Eivind Glomsrød <teg at redhat.com>
+- Don't obsolete itself
+
+* Mon May  7 2001 Trond Eivind Glomsrød <teg at redhat.com>
+- Initial build, it's no longer part of 4Suite
+
+
diff --git a/sources b/sources
index e69de29..23abbd5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+1f7655050cebbb664db976405fdba209  PyXML-0.8.4.tar.gz


More information about the scm-commits mailing list