Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889{ lib, buildPythonPackage, fetchFromGitHub, setuptools, python-dateutil, pytz, regex, tzlocal, hijridate, convertdate, fasttext, numpy, langdetect, parameterized, pytestCheckHook, gitpython, parsel, requests, ruamel-yaml, writableTmpDirAsHomeHook,}:
buildPythonPackage (finalAttrs: { pname = "dateparser"; version = "1.4.3";
pyproject = true;
src = fetchFromGitHub { owner = "scrapinghub"; repo = "dateparser"; tag = "v${finalAttrs.version}"; hash = "sha256-HaT+8aJ1qJ0irbDsv0nGn5Ln58lxfIIO6MnV+iOdEPM="; };
build-system = [ setuptools ];
dependencies = [ python-dateutil pytz regex tzlocal ];
optional-dependencies = { calendars = [ hijridate convertdate ]; fasttext = [ fasttext numpy ]; langdetect = [ langdetect ]; };
nativeCheckInputs = [ parameterized pytestCheckHook gitpython parsel requests ruamel-yaml writableTmpDirAsHomeHook ] ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
# Upstream only runs the tests in tests/ in CI, others use git clone enabledTestPaths = [ "tests" ];
disabledTests = [ # access network "test_custom_language_detect_fast_text_0" "test_custom_language_detect_fast_text_1" ];
pythonImportsCheck = [ "dateparser" ];
meta = { 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 ]; };})