python3Packages.dateparser: 1.4.1 -> 1.4.2 (#549328)

This commit is contained in:
dotlambda
2026-08-09 18:11:59 +00:00
committed by GitHub
2 changed files with 19 additions and 11 deletions

View File

@@ -18,19 +18,20 @@
parsel,
requests,
ruamel-yaml,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "dateparser";
version = "1.4.1";
version = "1.4.2";
pyproject = true;
src = fetchFromGitHub {
owner = "scrapinghub";
repo = "dateparser";
tag = "v${version}";
hash = "sha256-TA4GZb24++RF1sw4tECJF5UzouRCwwhPiim5z5/hMzU=";
tag = "v${finalAttrs.version}";
hash = "sha256-ulwX8yLLXm3V4eldiK+j0XWzgrPepeWiA3BAjDJv9iM=";
};
build-system = [ setuptools ];
@@ -61,12 +62,9 @@ buildPythonPackage rec {
parsel
requests
ruamel-yaml
writableTmpDirAsHomeHook
]
++ lib.concatAttrValues optional-dependencies;
preCheck = ''
export HOME="$TEMPDIR"
'';
++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
# Upstream only runs the tests in tests/ in CI, others use git clone
enabledTestPaths = [ "tests" ];
@@ -80,11 +78,11 @@ buildPythonPackage rec {
pythonImportsCheck = [ "dateparser" ];
meta = {
changelog = "https://github.com/scrapinghub/dateparser/blob/${src.tag}/HISTORY.rst";
changelog = "https://github.com/scrapinghub/dateparser/blob/${finalAttrs.src.tag}/HISTORY.rst";
description = "Date parsing library designed to parse dates from HTML pages";
homepage = "https://github.com/scrapinghub/dateparser";
license = lib.licenses.bsd3;
mainProgram = "dateparser-download";
maintainers = with lib.maintainers; [ dotlambda ];
};
}
})

View File

@@ -5,6 +5,7 @@
dateparser,
faust-cchardet,
fetchFromGitHub,
fetchpatch,
lxml,
pytestCheckHook,
python-dateutil,
@@ -24,6 +25,15 @@ buildPythonPackage rec {
hash = "sha256-3qtksgzqcgWtUv81Aqeh0nTWYnH0PjPLG4NuYChbV0g=";
};
patches = [
# https://github.com/adbar/htmldate/pull/199
(fetchpatch {
name = "fix-tests-with-dateparser-1.4.2.patch";
url = "https://github.com/adbar/htmldate/commit/14c70c4944f1a6950bedaf8b6e46b6ec726984b8.patch";
hash = "sha256-rtRUk9lGsNQyOZ5RAjvMP5JRa4WGWdo0Xzh0OvskYPs=";
})
];
build-system = [ setuptools ];
dependencies = [