1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ stdenv, fetchFromGitHub, buildPythonPackage, isPy3k
, nose
, parameterized
, mock
, glibcLocales
, six
, jdatetime
, pyyaml
, dateutil
, umalqurra
, pytz
, tzlocal
, regex
, ruamel_yaml }:
buildPythonPackage rec {
pname = "dateparser";
version = "0.6.0";
src = fetchFromGitHub {
owner = "scrapinghub";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "0q2vyzvlj46r6pr0s6m1a0md1cpg9nv1n3xw286l4x2cc7fj2g3y";
};
# Replace nose-parameterized by parameterized
prePatch = ''
sed -i s/nose_parameterized/parameterized/g tests/*.py
sed -i s/nose-parameterized/parameterized/g tests/requirements.txt
'';
# Upstream Issue: https://github.com/scrapinghub/dateparser/issues/364
disabled = isPy3k;
checkInputs = [ nose parameterized mock glibcLocales ];
preCheck =''
# skip because of missing convertdate module, which is an extra requirement
rm tests/test_jalali.py
'';
propagatedBuildInputs = [ six jdatetime pyyaml dateutil
umalqurra pytz tzlocal regex ruamel_yaml ];
meta = with stdenv.lib;{
description = "Date parsing library designed to parse dates from HTML pages";
homepage = https://github.com/scrapinghub/dateparser;
license = licenses.bsd3;
};
}
|