From 62d3d20919977ef78d455d71dfa9bb24beb6de62 Mon Sep 17 00:00:00 2001 From: Takuya Wakazono Date: Sun, 15 Feb 2026 17:53:17 +0900 Subject: [PATCH] dev-python/dateparser: add 1.3.0 Signed-off-by: Takuya Wakazono --- dev-python/dateparser/Manifest | 1 + dev-python/dateparser/dateparser-1.3.0.ebuild | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 dev-python/dateparser/dateparser-1.3.0.ebuild diff --git a/dev-python/dateparser/Manifest b/dev-python/dateparser/Manifest index 49d91572bd..2b4c61bcf4 100644 --- a/dev-python/dateparser/Manifest +++ b/dev-python/dateparser/Manifest @@ -1 +1,2 @@ DIST dateparser-1.2.2.tar.gz 329840 BLAKE2B 7f17feb402cd72d6b99c1c5e75627588e085963193aef72eaaeada82ea448d5d45c19d3aa5b8986500cecbc7b2417c9fc5f8526de47560455a6e9f12b2e500f1 SHA512 96ebc214843f57f3cdede79f63fd3067e9b26e17882a0dea023830e7a2a3f50b07145ae34d174bd3cd11f4f42980110111f90e7175fd38a4b0c428ac5f26428d +DIST dateparser-1.3.0.tar.gz 337152 BLAKE2B e0a1ec6d9f6097d46fb9924665be0ec483481bb4abce5d715953374c5cc82f1ef7f4323f56f6656f21a877098a849ade729ee594236cb05a6a1036b187a793a1 SHA512 6fe258a8e22c70e19df67230cc86a19006640747d1539be1391eb7fefcb93abaa91fa7b6e42d1c6fc00a4ac82d007e8e63de6e13c4c5a113018cf8eac5402df6 diff --git a/dev-python/dateparser/dateparser-1.3.0.ebuild b/dev-python/dateparser/dateparser-1.3.0.ebuild new file mode 100644 index 0000000000..f167a95875 --- /dev/null +++ b/dev-python/dateparser/dateparser-1.3.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{12..14} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 optfeature pypi + +DESCRIPTION="Date parsing library designed to parse dates from HTML pages" +HOMEPAGE=" + https://pypi.org/project/dateparser/ + https://github.com/scrapinghub/dateparser +" + +LICENSE="BSD" +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-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}] +)" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +distutils_enable_sphinx docs \ + dev-python/sphinx-rtd-theme + +python_test() { + # Need to set TZ when testing with gentoo docker images. + # Their /etc/{timezone,localtime} are inconsistent, which causes + # to tests to fail. + local -x TZ=UTC + + local EPYTEST_IGNORE=( + # tests that require network + tests/test_dateparser_data_integrity.py + ) + local EPYTEST_DESELECT=( + # tests that require network + tests/test_language_detect.py::CustomLangDetectParserTest::test_custom_language_detect_fast_text_{0,1} + ) + + epytest +} + +pkg_postinst() { + optfeature "calendars support" "dev-python/hijridate dev-python/convertdate" + optfeature "fasttext support" "dev-libs/fastText[python]" + optfeature "langdetect support" dev-python/langdetect +}