diff options
Diffstat (limited to 'dev-python/dateparser')
-rw-r--r-- | dev-python/dateparser/Manifest | 3 | ||||
-rw-r--r-- | dev-python/dateparser/dateparser-1.2.0.ebuild | 63 | ||||
-rw-r--r-- | dev-python/dateparser/metadata.xml | 13 |
3 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/dateparser/Manifest b/dev-python/dateparser/Manifest new file mode 100644 index 0000000..fcc7a4c --- /dev/null +++ b/dev-python/dateparser/Manifest @@ -0,0 +1,3 @@ +DIST dateparser-1.2.0.gh.tar.gz 507104 BLAKE2B 4bd8246466de29b27187a0694e20e8437f0559c5e15a31d8cae76dcb24794a86f4bb6ce91ead015cb606c6477762949e3ab2fea56685db4db0ef5fb62aace4da SHA512 2d37115f25c2076c4521b77b89ef1cff3cd0a5233c45beb00d78a5c9b1a384dcd993ff7cdd1f77db95a53ce566cf7d709d46ffa2e63eb468ac954fda178a5b6e +EBUILD dateparser-1.2.0.ebuild 1925 BLAKE2B 3806830568cac4e10abbba52562aa06c271c6a78d341de0c2edc6ad24973c237905fce06af0c032ac610edc002bac7515097c18b29a5e98cae7a631f1e71dc2d SHA512 ff3835ffa362131340d0ad63b1a76718881156023bd2de0cb7cb09d21b15e2fd8ebc192ce5a573a0ec0e9b59af6c39b97a48707168c8fab5f66d67560e2dfaf5 +MISC metadata.xml 461 BLAKE2B 079fbcba6175c6211350e505b57f42392e1e06207af98cbe7accf832e3529967b7267989c63af80dae7ae998e0b54a06d3983f29d0a7dce3be0427f310d4a3c8 SHA512 d2ea96814d08ae7a058bfbe8c507dcaadb0095397f7b4dd79739ee6a9acb02db6c1db8936a9e6020e9fd90c6d499883699fe6e0e42a567720879c166d1695f1c diff --git a/dev-python/dateparser/dateparser-1.2.0.ebuild b/dev-python/dateparser/dateparser-1.2.0.ebuild new file mode 100644 index 0000000..60556b9 --- /dev/null +++ b/dev-python/dateparser/dateparser-1.2.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 optfeature + +DESCRIPTION="Date parsing library designed to parse dates from HTML pages" +HOMEPAGE="https://github.com/scrapinghub/dateparser" +SRC_URI="https://github.com/scrapinghub/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="BSD-4" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/regex[${PYTHON_USEDEP}] + dev-python/tzlocal[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/GitPython[${PYTHON_USEDEP}] + dev-libs/fastText[python,${PYTHON_USEDEP}] + dev-python/convertdate[${PYTHON_USEDEP}] + dev-python/hijridate[${PYTHON_USEDEP}] + dev-python/langdetect[${PYTHON_USEDEP}] + dev-python/parameterized[${PYTHON_USEDEP}] + dev-python/parsel[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + ) +" + +EPYTEST_DESELECT=( + dateparser/date.py::dateparser.date.DateDataParser.get_date_data + dateparser/search/__init__.py::dateparser.search.search_dates + # Tests that require network + tests/test_language_detect.py::CustomLangDetectParserTest::test_custom_language_detect_fast_text_{0,1} +) + +distutils_enable_tests pytest +distutils_enable_sphinx docs \ + dev-python/sphinx-rtd-theme + +python_prepare_all() { + # hijri_converter is deprecated in favour of hijridate + sed -i -e 's|hijri_converter|hijridate|g' \ + dateparser/calendars/hijri_parser.py || die "sed failed" + # Require atheris fuzzer + rm -rf fuzzing + + distutils-r1_python_prepare_all +} + +pkg_postinst() { + optfeature "calendars support" "dev-python/hijridate dev-python/convertdate" + optfeature "fasttext support" "dev-libs/fastText[python]" + optfeature "operations on language files" dev-python/ruamel-yaml + optfeature "language detection support" dev-python/langdetect +} diff --git a/dev-python/dateparser/metadata.xml b/dev-python/dateparser/metadata.xml new file mode 100644 index 0000000..d860701 --- /dev/null +++ b/dev-python/dateparser/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marcin.deranek@slonko.net</email> + <name>Marcin Deranek</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/scrapinghub/dateparser/issues</bugs-to> + <remote-id type="github">scrapinghub/dateparser</remote-id> + <remote-id type="pypi">dateparser</remote-id> + </upstream> +</pkgmetadata> |