diff options
author | Aisha Tammy <gentoo@aisha.cc> | 2021-11-15 15:28:00 +0000 |
---|---|---|
committer | Aisha Tammy <gentoo@aisha.cc> | 2021-11-15 15:28:00 +0000 |
commit | 346c02dc937bc77d55a0419ecfe912630d3cd0fc (patch) | |
tree | 1d745d43b904c77d0b8a9098ffedaaa1707df5bb /dev-python/parsel | |
parent | dev-python/w3lib: library of web-related functions (diff) | |
download | guru-346c02dc937bc77d55a0419ecfe912630d3cd0fc.tar.gz guru-346c02dc937bc77d55a0419ecfe912630d3cd0fc.tar.bz2 guru-346c02dc937bc77d55a0419ecfe912630d3cd0fc.zip |
dev-python/parsel: extract data from XML/HTML documents
dependency for dev-python/scrapy
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Diffstat (limited to 'dev-python/parsel')
-rw-r--r-- | dev-python/parsel/Manifest | 1 | ||||
-rw-r--r-- | dev-python/parsel/files/parsel-1.6.0-pytest-runner.patch | 30 | ||||
-rw-r--r-- | dev-python/parsel/metadata.xml | 8 | ||||
-rw-r--r-- | dev-python/parsel/parsel-1.6.0.ebuild | 36 |
4 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/parsel/Manifest b/dev-python/parsel/Manifest new file mode 100644 index 000000000..7912a5960 --- /dev/null +++ b/dev-python/parsel/Manifest @@ -0,0 +1 @@ +DIST parsel-1.6.0.tar.gz 100678 BLAKE2B 9fe937013d84d168cab4e415affecece272f7b2af729448aaf802240d0d7aca553d85de5747cf06ecbd17099e2bd81c741a3afd6bbad803916afdfd3673c07d6 SHA512 d3161522e1102cceeb1f29ab020b33019d4ac7f096cfab8fbe40f54073e49afc24f02aa54206d86f56c8f92e3db2d0d2f8a3dbdfa6417492cf299201f2ae6604 diff --git a/dev-python/parsel/files/parsel-1.6.0-pytest-runner.patch b/dev-python/parsel/files/parsel-1.6.0-pytest-runner.patch new file mode 100644 index 000000000..33b533665 --- /dev/null +++ b/dev-python/parsel/files/parsel-1.6.0-pytest-runner.patch @@ -0,0 +1,30 @@ +diff --git a/pytest.ini b/pytest.ini +index 3e34de8..b9f5050 100644 +--- a/pytest.ini ++++ b/pytest.ini +@@ -1,11 +1,2 @@ + [pytest] +-addopts = --assert=plain --doctest-modules --ignore=setup.py +-flake8-ignore = +- parsel/csstranslator.py E501 +- parsel/selector.py E501 +- parsel/utils.py E226 E501 +- parsel/xpathfuncs.py E501 +- tests/test_selector.py E501 +- tests/test_selector_csstranslator.py E501 +- tests/test_utils.py E501 +- tests/test_xpathfuncs.py E501 ++addopts = --assert=plain --ignore=setup.py +diff --git a/setup.py b/setup.py +index d14ad0e..dc89534 100644 +--- a/setup.py ++++ b/setup.py +@@ -76,7 +76,7 @@ setup( + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + ], +- setup_requires=['pytest-runner',], ++ setup_requires=[], + tests_require=['pytest',], + test_suite='tests', + ) diff --git a/dev-python/parsel/metadata.xml b/dev-python/parsel/metadata.xml new file mode 100644 index 000000000..65ac1f205 --- /dev/null +++ b/dev-python/parsel/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@aisha.cc</email> + <name>Aisha Tammy</name> + </maintainer> +</pkgmetadata> diff --git a/dev-python/parsel/parsel-1.6.0.ebuild b/dev-python/parsel/parsel-1.6.0.ebuild new file mode 100644 index 000000000..ae93093d3 --- /dev/null +++ b/dev-python/parsel/parsel-1.6.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_9 ) +inherit distutils-r1 + +DESCRIPTION="Utility to extract data from XML/HTML documents using XPath or CSS selectors" +HOMEPAGE="https://scrapy.org/" +SRC_URI="https://github.com/scrapy/parsel/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT=0 +KEYWORDS="~amd64" + +DEPEND="${PYTHON_DEPS}" +RDEPEND="${DEPEND} + dev-python/cssselect[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/w3lib[${PYTHON_USEDEP}] +" +BDEPEND="${DEPEND} + test? ( + dev-python/sybil[${PYTHON_USEDEP}] + ) +" + +PATCHES=( "${FILESDIR}/${PN}-1.6.0-pytest-runner.patch" ) + +distutils_enable_tests pytest + +python_test() { + py.test --ignore=docs || die +} |