diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/lxml |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/Manifest | 11 | ||||
-rw-r--r-- | dev-python/lxml/files/lxml-3.5.0-cross-compile.patch | 39 | ||||
-rw-r--r-- | dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch | 36 | ||||
-rw-r--r-- | dev-python/lxml/lxml-3.7.3.ebuild | 80 | ||||
-rw-r--r-- | dev-python/lxml/lxml-3.8.0.ebuild | 80 | ||||
-rw-r--r-- | dev-python/lxml/lxml-4.0.0.ebuild | 80 | ||||
-rw-r--r-- | dev-python/lxml/metadata.xml | 11 |
7 files changed, 337 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest new file mode 100644 index 000000000000..0551480014e6 --- /dev/null +++ b/dev-python/lxml/Manifest @@ -0,0 +1,11 @@ +AUX lxml-3.5.0-cross-compile.patch 1518 SHA256 4d16cb9d2951fac9ec467d5fa9fd5d7c0565fd746eb8200924a75474def4c3bd SHA512 b53925979e554552e72e58e06df579d2eb0190cadc304d13766852eaaeec78641deb1ef10700a0b52aebbdc998979830413a76a56cf221bce2e9a24926e1680b WHIRLPOOL 67b446ef6f66d5fca0fe4261d47508a2fa3e850cc03f7329b01fbe27476e844faacd6e310d8973654477361ea5ed7060d7c6b5290f521c3b6a6b02e2ee83eebd +AUX lxml-3.6.4-fix-test_xmlschema.patch 1483 SHA256 6f44d53b78ac07cdd87cd3653d236a62ca60d83b6dba1fef65aa4d9858d7ed71 SHA512 5ea10849df7966b8e1c55a699c1489f72714449de3564ee13b5d9410877db3691e82c1d37cb6ea60c30c2deac33bb839583f0bb81a3551baac39bf14ca066229 WHIRLPOOL 15589a917a2b8eff7989205c60368be8a462c2937db085c7bc8662a119382defda88d0e9129222711c857f417f81530194a7ca3a34d7c76a438ac3f5554935fd +DIST lxml-3.7.3.tar.gz 3797713 SHA256 aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7 SHA512 9bf1142e81b6e1c8a47e296774d7e448d9ed47de3672f7442cc33274b07252baa47a9346efa9d2fda7b7bb66beb95bbc81f0ae16c9f808ff568f330991dd6d13 WHIRLPOOL d3881f308622ed8beb03a59bbf8256a55b92f5cf41c2c9a0c65c1e53acceea33ab93f420151330b09e8dbde3f717d5c095aa0275406355ec4a17105de46b6bae +DIST lxml-3.8.0.tar.gz 3795205 SHA256 736f72be15caad8116891eb6aa4a078b590d231fdc63818c40c21624ac71db96 SHA512 08f6f352e22ed2bc199a5f34a1c6b5f7b41ec282dc0026c9f16a06466c27e39e8eb18608ba4493636170eeac4b0194f7050445e1cc9bd0a4628573c404593088 WHIRLPOOL b09d7509ca55df74c5ced03ca91b72e0f373df6cb22331a452a35cfe3aa305bb9417280ae0b4835cd4abd29f7df465468799fa25c1b8d732152222c74fee51e1 +DIST lxml-4.0.0.tar.gz 4217301 SHA256 f7bc9f702500e205b1560d620f14015fec76dcd6f9e889a946a2ddcc3c344fd0 SHA512 8aa85ab6a99097ae2eaa0087b3a663aae8ac81a0a4d685bf857571c811c8ccd6410afc414f14c68702a53e90265726af085d0609ec7f0d3cc96e3702772627e8 WHIRLPOOL 24ad26d075ecf8f7062a6aa695557628664ce9d23cee7f66218bc373c90feec07bdf8a7f6e4501b996bd4bb208ca173faac1609262c08c6313f5a2d155eed220 +EBUILD lxml-3.7.3.ebuild 2225 SHA256 31a982ad59109791756145d68de4f9bf57eb7108af300d50d2b8b37494999bfa SHA512 c50654ba48c2437f5fa8f27a04d58ec827dea8c11fc1d36a3112f56cf872da4bea02f664a74cdff7899e9dbd13722896e1cf6dfad8d9485313a1342017972d94 WHIRLPOOL 289b35a0ba855a747573a2761becf22360f4fb344223207bc217a058fc998071b6e519ff00af7baa76d5e66cf5b0252bf251b2c6fb19a97c0b298d148cccc2a5 +EBUILD lxml-3.8.0.ebuild 2254 SHA256 c2f8ec55283ff70da5ceef74fa9900736d4badef700dc3d47414161a62fcd26a SHA512 bd042b2a97d121436bc890f017b908510e4c199a37524c0497c0adb0d81071c3061f67b0f9fc1435def6d47cd9a4970e9f7f94aba9a629b8964d351a7d58b75b WHIRLPOOL 7095b783b48e379e2de8ae2cd5897e519b93ddec199978b74c425bfef7c8e07b9ed6c69ea1f3953fd12e57048d6d95fec5a094855a4146597382629c0dafe2f1 +EBUILD lxml-4.0.0.ebuild 2264 SHA256 06ca03fe985b78c67c8da68fb9f8a0ac321b08d880e96d3f3ce3a0af1ab9ea2e SHA512 0d03174c227a945680fcaa13ba8ba1f28981b52a8f45693564b258b5f8966217eda13dc4e72307394ae4de0696e34f977b62bfba01d547d893bd9d1dd6a08cf6 WHIRLPOOL 958a8e6d94728bdd46ea1dda4d6e37b6cb169db602a586cabca303f41b0f34c3989c2b1e949df133892014b47b5c4e646a59a0621dade74b4eda9d51febf26f5 +MISC ChangeLog 11862 SHA256 6fd242f3eee218860f8744e0c5656c51599e9a80cbc75e12c954a543a03ead94 SHA512 220b3df834fd4e8d85cfc46bec8a414042c06d4cd05efa887f619e855b452c7e69c7713d70478cdea9264a83f5012b5f0d0604c7511e07f495d8a0d02ae0a721 WHIRLPOOL 9771d6651fa6a474fd3e234504e419b18f9d1e266253bef4b6500e33b3d3c477aca2d2d45d6b72b9fbd144f6e9875700df0cf84e96c45482ad228e3eb89da280 +MISC ChangeLog-2015 27655 SHA256 585c3b7babb59fabf24b0bbd3abfa0abbe5f35c92faaccb0df995c61b5878b24 SHA512 0a05a247257042ba708d9914e6757aa60ece30eb67d1892b164f49d2d2825d467b4fe60396bbbadb692fc0a6f11e28efc8b6cce6176966a9e4f4669b1fff651a WHIRLPOOL d031211ffd5cc010d16cc3d872a6ed17d348103302f65e7ecb9af1082659f85e6b65babf36ec347ae1c03cf8822d71bc679eb6738bbcb892d8dbeeb322c34082 +MISC metadata.xml 317 SHA256 cd18e04d042e1f29961f6fd28916572028bba9f9fc0dfe26da78c3347b4d49e9 SHA512 900609bfd7cd032821afb5d1f6e5c25287178f06a49e59431a710d4e76187a2b41a4a0da383d257777a2120b60f15620da37c70d145eca4a84aa30a08b824fae WHIRLPOOL 093286f5009a9dff327e1f6931f18e9081a7972a86ed88d1f04f612d68e9dbb94bc5847c8430554ffb29a51cc0b233de03d82f8d4d086a116a124826faeabcd7 diff --git a/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch b/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch new file mode 100644 index 000000000000..82a371c72978 --- /dev/null +++ b/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch @@ -0,0 +1,39 @@ + setupinfo.py | 18 +++--------------- + 1 file changed, 3 insertions(+), 15 deletions(-) + +diff --git a/setupinfo.py b/setupinfo.py +index e04c38f..0549eaa 100644 +--- a/setupinfo.py ++++ b/setupinfo.py +@@ -93,19 +93,6 @@ def ext_modules(static_include_dirs, static_library_dirs, + source_extension = ".c" + print("Building without Cython.") + +- lib_versions = get_library_versions() +- versions_ok = True +- if lib_versions[0]: +- print("Using build configuration of libxml2 %s and libxslt %s" % +- lib_versions) +- versions_ok = check_min_version(lib_versions[0], (2, 7, 0), 'libxml2') +- else: +- print("Using build configuration of libxslt %s" % +- lib_versions[1]) +- versions_ok |= check_min_version(lib_versions[1], (1, 1, 23), 'libxslt') +- if not versions_ok: +- raise RuntimeError("Dependency missing") +- + base_dir = get_base_dir() + _include_dirs = _prefer_reldirs( + base_dir, include_dirs(static_include_dirs) + [INCLUDE_PACKAGE_PATH]) +@@ -358,8 +345,9 @@ def get_library_versions(): + + + def flags(option): +- xml2_flags = run_command(find_xml2_config(), "--%s" % option) +- xslt_flags = run_command(find_xslt_config(), "--%s" % option) ++ pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') ++ xml2_flags = run_command(pkg_config, 'libxml-2.0', '--%s' % option) ++ xslt_flags = run_command(pkg_config, 'libxslt', '--%s' % option) + + flag_list = xml2_flags.split() + for flag in xslt_flags.split(): diff --git a/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch new file mode 100644 index 000000000000..13f963ab2e2f --- /dev/null +++ b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch @@ -0,0 +1,36 @@ +diff --git a/src/lxml/tests/test_xmlschema.py b/src/lxml/tests/test_xmlschema.py +index 26d8432..b41c097 100644 +--- a/src/lxml/tests/test_xmlschema.py ++++ b/src/lxml/tests/test_xmlschema.py +@@ -168,31 +168,6 @@ class ETreeXMLSchemaTestCase(HelperTestCase): + self.assertEqual('ho', root[2].get('hardy')) + self.assertEqual('hey', root[3].get('hardy')) + +- def test_xmlschema_parse_fixed_attributes(self): +- # does not work as of libxml2 2.7.3 +- schema = self.parse(''' +-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> +- <xsd:element name="a" type="AType"/> +- <xsd:complexType name="AType"> +- <xsd:sequence minOccurs="3" maxOccurs="3"> +- <xsd:element name="b" type="BType" /> +- </xsd:sequence> +- </xsd:complexType> +- <xsd:complexType name="BType"> +- <xsd:attribute name="hardy" type="xsd:string" fixed="hey" /> +- </xsd:complexType> +-</xsd:schema> +-''') +- schema = etree.XMLSchema(schema) +- parser = etree.XMLParser(schema=schema, attribute_defaults=True) +- +- tree_valid = self.parse('<a><b/><b hardy="hey"/><b/></a>', +- parser=parser) +- root = tree_valid.getroot() +- self.assertEqual('hey', root[0].get('hardy')) +- self.assertEqual('hey', root[1].get('hardy')) +- self.assertEqual('hey', root[2].get('hardy')) +- + def test_xmlschema_stringio(self): + schema_file = BytesIO(''' + <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> diff --git a/dev-python/lxml/lxml-3.7.3.ebuild b/dev-python/lxml/lxml-3.7.3.ebuild new file mode 100644 index 000000000000..f2a0ffd01303 --- /dev/null +++ b/dev-python/lxml/lxml-3.7.3.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit distutils-r1 eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" +HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD ElementTree GPL-2 PSF-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples +threads test" + +# Note: lib{xml2,xslt} are used as C libraries, not Python modules. +RDEPEND=" + >=dev-libs/libxml2-2.9.2 + >=dev-libs/libxslt-1.1.28" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/cssselect[${PYTHON_USEDEP}] ) + " + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch + + # This patch removes a testcase that fails because of issues + # in libxml2. + # + # Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479 + "${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch +) + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i '/sys\.path/d' test.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if [[ ${EPYTHON} != python3* ]]; then + local -x CFLAGS="${CFLAGS}" + append-cflags -fno-strict-aliasing + fi + tc-export PKG_CONFIG + distutils-r1_python_compile +} + +python_test() { + cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die + cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die + ln -s "${S}"/doc "${BUILD_DIR}"/ || die + + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}" +} + +python_install_all() { + if use doc; then + local DOCS=( *.txt doc/*.txt ) + local HTML_DOCS=( doc/html/. ) + fi + if use examples; then + docinto examples + dodoc -r samples/. + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect +} diff --git a/dev-python/lxml/lxml-3.8.0.ebuild b/dev-python/lxml/lxml-3.8.0.ebuild new file mode 100644 index 000000000000..224c7a410152 --- /dev/null +++ b/dev-python/lxml/lxml-3.8.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit distutils-r1 eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" +HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/ https://github.com/lxml/lxml" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD ElementTree GPL-2 PSF-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples +threads test" + +# Note: lib{xml2,xslt} are used as C libraries, not Python modules. +RDEPEND=" + >=dev-libs/libxml2-2.9.2 + >=dev-libs/libxslt-1.1.28" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/cssselect[${PYTHON_USEDEP}] ) + " + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch + + # This patch removes a testcase that fails because of issues + # in libxml2. + # + # Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479 + "${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch +) + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i '/sys\.path/d' test.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if [[ ${EPYTHON} != python3* ]]; then + local -x CFLAGS="${CFLAGS}" + append-cflags -fno-strict-aliasing + fi + tc-export PKG_CONFIG + distutils-r1_python_compile +} + +python_test() { + cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die + cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die + ln -s "${S}"/doc "${BUILD_DIR}"/ || die + + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}" +} + +python_install_all() { + if use doc; then + local DOCS=( *.txt doc/*.txt ) + local HTML_DOCS=( doc/html/. ) + fi + if use examples; then + docinto examples + dodoc -r samples/. + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect +} diff --git a/dev-python/lxml/lxml-4.0.0.ebuild b/dev-python/lxml/lxml-4.0.0.ebuild new file mode 100644 index 000000000000..2ab0055cd819 --- /dev/null +++ b/dev-python/lxml/lxml-4.0.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit distutils-r1 eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" +HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/ https://github.com/lxml/lxml" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD ElementTree GPL-2 PSF-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples +threads test" + +# Note: lib{xml2,xslt} are used as C libraries, not Python modules. +RDEPEND=" + >=dev-libs/libxml2-2.9.2 + >=dev-libs/libxslt-1.1.28" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/cssselect[${PYTHON_USEDEP}] ) + " + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch + + # This patch removes a testcase that fails because of issues + # in libxml2. + # + # Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479 + "${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch +) + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i '/sys\.path/d' test.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if [[ ${EPYTHON} != python3* ]]; then + local -x CFLAGS="${CFLAGS}" + append-cflags -fno-strict-aliasing + fi + tc-export PKG_CONFIG + distutils-r1_python_compile +} + +python_test() { + cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die + cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die + ln -s "${S}"/doc "${BUILD_DIR}"/ || die + + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}" +} + +python_install_all() { + if use doc; then + local DOCS=( *.txt doc/*.txt ) + local HTML_DOCS=( doc/html/. ) + fi + if use examples; then + docinto examples + dodoc -r samples/. + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect +} diff --git a/dev-python/lxml/metadata.xml b/dev-python/lxml/metadata.xml new file mode 100644 index 000000000000..ed72c69d7530 --- /dev/null +++ b/dev-python/lxml/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">lxml</remote-id> + </upstream> +</pkgmetadata> |