pythonPackages.dateparser: add python2-compatible expression
This commit is contained in:
parent
e1d60a05af
commit
dc7fd28f2a
55
pkgs/development/python-modules/dateparser/0.x.nix
Normal file
55
pkgs/development/python-modules/dateparser/0.x.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, mock
|
||||||
|
, parameterized
|
||||||
|
, pytestCheckHook
|
||||||
|
, dateutil
|
||||||
|
, pytz
|
||||||
|
, regex
|
||||||
|
, tzlocal
|
||||||
|
, convertdate
|
||||||
|
, umalqurra
|
||||||
|
, jdatetime
|
||||||
|
, ruamel_yaml
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "dateparser";
|
||||||
|
version = "0.7.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "scrapinghub";
|
||||||
|
repo = "dateparser";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0j3sm4hlx7z0ci5fnjq5n9i02vvlfz0wxa889ydryfknjhy5apqw";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
mock
|
||||||
|
parameterized
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pytestFlagsArray = [ "tests" ];
|
||||||
|
|
||||||
|
disabledTestPaths = [
|
||||||
|
"tests/test_dateparser_data_integrity.py" # ImportError: No module named ruamel.yaml
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
# install_requires
|
||||||
|
dateutil pytz regex tzlocal
|
||||||
|
# extra_requires
|
||||||
|
convertdate umalqurra jdatetime ruamel_yaml
|
||||||
|
];
|
||||||
|
|
||||||
|
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;
|
||||||
|
maintainers = with maintainers; [ dotlambda ];
|
||||||
|
};
|
||||||
|
}
|
@ -1669,7 +1669,10 @@ in {
|
|||||||
inherit (pkgs.llvmPackages) libcxx;
|
inherit (pkgs.llvmPackages) libcxx;
|
||||||
};
|
};
|
||||||
|
|
||||||
dateparser = callPackage ../development/python-modules/dateparser { };
|
dateparser = if isPy27 then
|
||||||
|
callPackage ../development/python-modules/dateparser/0.x.nix { }
|
||||||
|
else
|
||||||
|
callPackage ../development/python-modules/dateparser { };
|
||||||
|
|
||||||
datrie = callPackage ../development/python-modules/datrie { };
|
datrie = callPackage ../development/python-modules/datrie { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user