nixpkgs/pkgs/development/python-modules/dateparser/default.nix

56 lines
1.1 KiB
Nix
Raw Normal View History

2021-03-10 13:49:50 +00:00
{ lib
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, dateutil
, 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
}:
buildPythonPackage rec {
pname = "dateparser";
version = "1.0.0";
disabled = !isPy3k;
2021-03-10 13:49:50 +00:00
src = fetchFromGitHub {
owner = "scrapinghub";
repo = "dateparser";
rev = "v${version}";
sha256 = "0i6ci14lqfsqrmaif57dyilrjbxzmbl98hps1b565gkiy1xqmjhl";
};
propagatedBuildInputs = [
# install_requires
dateutil pytz regex tzlocal
# extra_requires
2021-03-10 13:49:50 +00:00
hijri-converter convertdate
];
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" ];
meta = with lib; {
description = "Date parsing library designed to parse dates from HTML pages";
homepage = "https://github.com/scrapinghub/dateparser";
license = licenses.bsd3;
2021-03-10 13:49:50 +00:00
maintainers = with maintainers; [ dotlambda ];
};
}