diff --git a/dev-python/scrapy/Manifest b/dev-python/scrapy/Manifest new file mode 100644 index 0000000000..e42b11779e --- /dev/null +++ b/dev-python/scrapy/Manifest @@ -0,0 +1 @@ +DIST scrapy-2.5.1.tar.gz 1276985 BLAKE2B 7e4a43391a8dd4f641d188c7a89d26d52bc51aae3eb8340e02c9de2477bc6458f80b3a8ba16f6a17a9ec1debb85fe558fb7c1c48358fd923e02864758ea75fa5 SHA512 4285272412b4c474707e864ece701990435d206b0a1ef28cb9f99cff87a02e6b0323e744e96f15878a3b433a7efe4be413d24068bb252f00f9ab1b0a980d844a diff --git a/dev-python/scrapy/files/scrapy-2.5.1-no-doctest.patch b/dev-python/scrapy/files/scrapy-2.5.1-no-doctest.patch new file mode 100644 index 0000000000..7c1b76d052 --- /dev/null +++ b/dev-python/scrapy/files/scrapy-2.5.1-no-doctest.patch @@ -0,0 +1,12 @@ +diff --git a/pytest.ini b/pytest.ini +index 0aae09f..c1f20ee 100644 +--- a/pytest.ini ++++ b/pytest.ini +@@ -5,7 +5,6 @@ python_files=test_*.py __init__.py + python_classes= + addopts = + --assert=plain +- --doctest-modules + --ignore=docs/_ext + --ignore=docs/conf.py + --ignore=docs/news.rst diff --git a/dev-python/scrapy/metadata.xml b/dev-python/scrapy/metadata.xml new file mode 100644 index 0000000000..65ac1f2056 --- /dev/null +++ b/dev-python/scrapy/metadata.xml @@ -0,0 +1,8 @@ + + + + + gentoo@aisha.cc + Aisha Tammy + + diff --git a/dev-python/scrapy/scrapy-2.5.1.ebuild b/dev-python/scrapy/scrapy-2.5.1.ebuild new file mode 100644 index 0000000000..49db3dcb4e --- /dev/null +++ b/dev-python/scrapy/scrapy-2.5.1.ebuild @@ -0,0 +1,58 @@ +# 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="A high-level Web Crawling and Web Scraping framework" +HOMEPAGE="https://scrapy.org/" +SRC_URI="https://github.com/scrapy/scrapy/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT=0 +KEYWORDS="~amd64" + +# The 'PyDispatcher>=2.0.5' distribution was not found and is required by Scrapy +# https://bugs.gentoo.org/684734 +RDEPEND="${PYTHON_DEPS} + dev-python/cssselect[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + =dev-python/twisted-17.9.0[${PYTHON_USEDEP}] + dev-python/w3lib[${PYTHON_USEDEP}] + dev-python/zope-interface[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + test? ( + dev-python/testfixtures[${PYTHON_USEDEP}] + dev-python/uvloop[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( "${FILESDIR}/${PN}-2.5.1-no-doctest.patch" ) + +python_test() { + py.test -vv --ignore=docs \ + --ignore="tests/test_proxy_connect.py" \ + --ignore="tests/test_utils_display.py" \ + --ignore="tests/test_command_check.py" \ + --ignore="tests/test_feedexport.py" \ + --ignore="tests/test_pipeline_files.py" \ + --ignore="tests/test_pipeline_images.py" \ + --ignore="tests/test_squeues.py" || die +}