2021-03-10 13:49:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchFromGitHub
|
2021-07-03 12:37:24 +01:00
|
|
|
, python-dateutil
|
2017-12-12 10:33:33 +00:00
|
|
|
, pytz
|
|
|
|
, regex
|
2021-03-10 13:49:50 +00:00
|
|
|
, tzlocal
|
|
|
|
, hijri-converter
|
|
|
|
, convertdate
|
|
|
|
, parameterized
|
|
|
|
, pytestCheckHook
|
|
|
|
, GitPython
|
2020-06-07 14:36:06 +01:00
|
|
|
, ruamel_yaml
|
|
|
|
}:
|
2018-02-09 16:22:39 +00:00
|
|
|
|
2017-12-12 10:33:33 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dateparser";
|
2020-11-29 14:04:26 +00:00
|
|
|
version = "1.0.0";
|
2017-12-12 10:33:33 +00:00
|
|
|
|
2021-03-10 13:30:32 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2021-03-10 13:49:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scrapinghub";
|
|
|
|
repo = "dateparser";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0i6ci14lqfsqrmaif57dyilrjbxzmbl98hps1b565gkiy1xqmjhl";
|
2017-12-12 10:33:33 +00:00
|
|
|
};
|
|
|
|
|
2018-02-09 16:22:39 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# install_requires
|
2021-07-03 12:37:24 +01:00
|
|
|
python-dateutil pytz regex tzlocal
|
2018-02-09 16:22:39 +00:00
|
|
|
# extra_requires
|
2021-03-10 13:49:50 +00:00
|
|
|
hijri-converter convertdate
|
2018-02-09 16:22:39 +00:00
|
|
|
];
|
2017-12-12 10:33:33 +00:00
|
|
|
|
2021-03-10 13:49:50 +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" ];
|
|
|
|
|
2018-02-09 16:22:39 +00:00
|
|
|
meta = with lib; {
|
2017-12-12 10:33:33 +00:00
|
|
|
description = "Date parsing library designed to parse dates from HTML pages";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/scrapinghub/dateparser";
|
2017-12-12 10:33:33 +00:00
|
|
|
license = licenses.bsd3;
|
2021-03-10 13:49:50 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2017-12-12 10:33:33 +00:00
|
|
|
};
|
|
|
|
}
|