diff options
Diffstat (limited to '')
-rw-r--r-- | dev-python/cython/Manifest | 2 | ||||
-rw-r--r-- | dev-python/cython/cython-0.9.6.12.ebuild | 40 | ||||
-rw-r--r-- | dev-python/lxml/Manifest | 4 | ||||
-rw-r--r-- | dev-python/lxml/files/gtk-threading-filename-guessing.patch | 35 | ||||
-rw-r--r-- | dev-python/lxml/files/parse-gtk-problem.patch | 45 | ||||
-rw-r--r-- | dev-python/lxml/lxml-2.0.2-r1.ebuild | 57 |
6 files changed, 183 insertions, 0 deletions
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest new file mode 100644 index 0000000..edaa049 --- /dev/null +++ b/dev-python/cython/Manifest @@ -0,0 +1,2 @@ +DIST Cython-0.9.6.12.zip 1294449 RMD160 120aa9d6dcbe1357fad6c61d4868039e0f27c0d9 SHA1 1e57efbb48bbd3a8a997300edef325351eef0c77 SHA256 9423dfd5502f3b38699dd3d8cda0aca8cd9fb4b94d0c9160901dfb1c3cb705d6 +EBUILD cython-0.9.6.12.ebuild 968 RMD160 44755fd29af16db55d7ec4efdd8379187d7307b7 SHA1 0e3806e5d49ac0a0e08d5fa7ccd02331186f79ab SHA256 9cb10e2151faf78ff4eef3ff84b9e6576b363cbf89e1afbbe1fda8ad96403f24 diff --git a/dev-python/cython/cython-0.9.6.12.ebuild b/dev-python/cython/cython-0.9.6.12.ebuild new file mode 100644 index 0000000..5a0b4e9 --- /dev/null +++ b/dev-python/cython/cython-0.9.6.12.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/cython/cython-0.9.6.10b.ebuild,v 1.1 2008/01/04 16:51:19 hawking Exp $ + +NEED_PYTHON=2.2 + +inherit distutils eutils + +MY_PN="Cython" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="A language for writing Python extension modules based on pyrex" +HOMEPAGE="http://www.cython.org/" +SRC_URI="http://www.cython.org/${MY_P}.zip" + +LICENSE="PSF-2.4" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples" + +DEPEND="app-arch/unzip" + +S="${WORKDIR}/${MY_P}" + +PYTHON_MODNAME="${MY_PN}" +DOCS="ToDo.txt USAGE.txt" + +src_install() { + distutils_src_install + + # -A c switch is for Doc/primes.c + use doc && dohtml -A c -r Doc/* + + if use examples; then + # Demos/ has files with .so,~ suffixes. + # So we have to specify precisely what to install. + insinto /usr/share/doc/${PF}/examples + doins Demos/Makefile* Demos/Setup.py Demos/*.{py,pyx,pxd} + fi +} diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest new file mode 100644 index 0000000..e4217f6 --- /dev/null +++ b/dev-python/lxml/Manifest @@ -0,0 +1,4 @@ +AUX gtk-threading-filename-guessing.patch 1054 RMD160 81d9090a447539beb6644249d5366f4d36ea6009 SHA1 1bc29d5737c6fe03fee3566b507695abec638834 SHA256 8b7d6c847c27948455ec3bb74f998ddc807aa293c1083608880716e555a693a0 +AUX parse-gtk-problem.patch 1698 RMD160 179c0807ec7335e63853fd65981cf6b21884f9e3 SHA1 56918ec6f47ef7da5118d76acb21414615091eef SHA256 d42eac9ed08e0c36fa010b4b9f37904b428a2fe4d5376b44aba38aa95ba76331 +DIST lxml-2.0.2.tgz 2002234 RMD160 c3ed569aee8112dfaca2c7be7309ca51cf23317d SHA1 97fc60896e34b48b6179ecc5ebb68ca96cbf2a4a SHA256 0f1a1f9ad32fbd6a60f985a71b9266996b2b4bb4831ff5945106f8fc7fa11a56 +EBUILD lxml-2.0.2-r1.ebuild 1530 RMD160 aaeec83741ead12ad0be063b1e518640666a74d3 SHA1 192c1599e86a6106d69a163689a42c5e9b370b73 SHA256 f813996fe966e4d01ef24b6486d99a2ac0f32ab1777700d9d7792b4b671154ba diff --git a/dev-python/lxml/files/gtk-threading-filename-guessing.patch b/dev-python/lxml/files/gtk-threading-filename-guessing.patch new file mode 100644 index 0000000..a48f258 --- /dev/null +++ b/dev-python/lxml/files/gtk-threading-filename-guessing.patch @@ -0,0 +1,35 @@ +=== src/lxml/apihelpers.pxi +================================================================== +--- src/lxml/apihelpers.pxi (revision 3804) ++++ src/lxml/apihelpers.pxi (revision 3805) +@@ -1107,20 +1107,16 @@ + Returns None if not a file object. + """ + # file instances have a name attribute +- try: +- return source.name +- except AttributeError: +- pass ++ filename = getattr3(source, 'name', None) ++ if filename is not None: ++ return filename + # gzip file instances have a filename attribute +- try: +- return source.filename +- except AttributeError: +- pass ++ filename = getattr3(source, 'filename', None) ++ if filename is not None: ++ return filename + # urllib2 provides a geturl() method +- try: +- geturl = source.geturl +- except AttributeError: +- # can't determine filename +- return None +- else: ++ geturl = getattr3(source, 'geturl', None) ++ if geturl is not None: + return geturl() ++ # can't determine filename ++ return None diff --git a/dev-python/lxml/files/parse-gtk-problem.patch b/dev-python/lxml/files/parse-gtk-problem.patch new file mode 100644 index 0000000..e8aafdf --- /dev/null +++ b/dev-python/lxml/files/parse-gtk-problem.patch @@ -0,0 +1,45 @@ +=== src/lxml/parser.pxi +================================================================== +--- src/lxml/parser.pxi (revision 3798) ++++ src/lxml/parser.pxi (revision 3799) +@@ -1294,10 +1294,22 @@ + + cdef _Document _parseDocument(source, _BaseParser parser, base_url): + cdef _Document doc ++ if _isString(source): ++ # parse the file directly from the filesystem ++ doc = _parseDocumentFromURL(_encodeFilename(source), parser) ++ # fix base URL if requested ++ if base_url is not None: ++ base_url = _encodeFilenameUTF8(base_url) ++ if doc._c_doc.URL is not NULL: ++ tree.xmlFree(doc._c_doc.URL) ++ doc._c_doc.URL = tree.xmlStrdup(_cstr(base_url)) ++ return doc ++ + if base_url is not None: + url = base_url + else: + url = _getFilenameForFile(source) ++ + if hasattr(source, 'getvalue') and hasattr(source, 'tell'): + # StringIO - reading from start? + if source.tell() == 0: +@@ -1309,16 +1321,7 @@ + return _parseFilelikeDocument( + source, _encodeFilenameUTF8(url), parser) + +- # Otherwise parse the file directly from the filesystem +- filename = _encodeFilename(source) +- doc = _parseDocumentFromURL(filename, parser) +- # fix base URL if requested +- if base_url is not None: +- base_url = _encodeFilenameUTF8(base_url) +- if doc._c_doc.URL is not NULL: +- tree.xmlFree(doc._c_doc.URL) +- doc._c_doc.URL = tree.xmlStrdup(_cstr(base_url)) +- return doc ++ raise TypeError("cannot parse from '%s'" % python._fqtypename(source)) + + cdef _Document _parseDocumentFromURL(url, _BaseParser parser): + cdef xmlDoc* c_doc diff --git a/dev-python/lxml/lxml-2.0.2-r1.ebuild b/dev-python/lxml/lxml-2.0.2-r1.ebuild new file mode 100644 index 0000000..6dc7329 --- /dev/null +++ b/dev-python/lxml/lxml-2.0.2-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/lxml-2.0.2.ebuild,v 1.2 2008/03/16 23:09:33 jer Exp $ + +NEED_PYTHON="2.3" + +inherit distutils eutils multilib + +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" +HOMEPAGE="http://codespeak.net/lxml/" +SRC_URI="http://codespeak.net/lxml/${P}.tgz" +LICENSE="BSD ElementTree GPL-2 PSF-2.4" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~x86" +IUSE="doc examples" + +# Note: This version comes with it's own bundled svn version of pyrex +RDEPEND=">=dev-libs/libxml2-2.6.20 + >=dev-libs/libxslt-1.1.15" +DEPEND="${RDEPEND} + >=dev-python/setuptools-0.6_rc5 + >=dev-python/cython-0.9.6.12" + +src_compile () { + rm ${S}/src/lxml/lxml.*.c + #epatch "${FILESDIR}/parse-gtk-problem.patch" + epatch "${FILESDIR}/gtk-threading-filename-guessing.patch" + distutils_src_compile +} + +src_install() { + distutils_src_install + + if use doc; then + dohtml doc/html/* + dodoc *.txt + docinto doc + dodoc doc/*.txt + fi + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r samples/* + fi +} + +src_test() { + distutils_python_version + python setup.py build_ext -i || die "building extensions for test use failed" + einfo "Running test" + "${python}" test.py || die "tests failed" + export PYTHONPATH="${PYTHONPATH}:${S}/src" + einfo "Running selftest" + "${python}" selftest.py || die "selftest failed" + einfo "Running selftest2" + "${python}" selftest2.py || die "selftest2 failed" +} |