Something went wrong. Try again.
lol
Something went wrong. Try again.
1.7 kB · 90 lines
Nix
at master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091{ lib, buildPythonPackage, fetchFromGitHub, setuptools, python-dateutil, pytz, regex, tzlocal, hijridate, convertdate, fasttext, numpy, langdetect, parameterized, pytestCheckHook, gitpython, parsel, requests, ruamel-yaml,}:
buildPythonPackage rec { pname = "dateparser"; version = "1.4.0";
pyproject = true;
src = fetchFromGitHub { owner = "scrapinghub"; repo = "dateparser"; tag = "v${version}"; hash = "sha256-CmcQf0cGcZVmZfpLSYDGdZUj83T7enNRl9FTY1Q6vtk="; };
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 ] ++ lib.concatAttrValues optional-dependencies;
preCheck = '' export HOME="$TEMPDIR" '';
# 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/${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 ]; };}