2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchFromGitHub
|
2021-07-04 02:40:35 +00:00
|
|
|
, python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
|
|
|
, regex
|
2021-04-05 15:23:46 +00:00
|
|
|
, tzlocal
|
|
|
|
, hijri-converter
|
|
|
|
, convertdate
|
|
|
|
, parameterized
|
|
|
|
, pytestCheckHook
|
|
|
|
, GitPython
|
2020-06-15 15:56:04 +00:00
|
|
|
, ruamel_yaml
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dateparser";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scrapinghub";
|
|
|
|
repo = "dateparser";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0i6ci14lqfsqrmaif57dyilrjbxzmbl98hps1b565gkiy1xqmjhl";
|
|
|
|
};
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# install_requires
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil pytz regex tzlocal
|
2020-04-24 23:36:52 +00:00
|
|
|
# extra_requires
|
2021-04-05 15:23:46 +00:00
|
|
|
hijri-converter convertdate
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
checkInputs = [
|
|
|
|
parameterized
|
|
|
|
pytestCheckHook
|
|
|
|
GitPython
|
|
|
|
ruamel_yaml
|
|
|
|
];
|
|
|
|
|
|
|
|
# Upstream only runs the tests in tests/ in CI, others use git clone
|
|
|
|
pytestFlagsArray = [ "tests" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "dateparser" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Date parsing library designed to parse dates from HTML pages";
|
|
|
|
homepage = "https://github.com/scrapinghub/dateparser";
|
|
|
|
license = licenses.bsd3;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|