1{ lib, fetchPypi, buildPythonPackage
2, nose
3, parameterized
4, mock
5, flake8
6, glibcLocales
7, six
8, jdatetime
9, dateutil
10, umalqurra
11, pytz
12, tzlocal
13, regex
14, ruamel_yaml
15, python
16, isPy3k
17}:
18
19buildPythonPackage rec {
20 pname = "dateparser";
21 version = "0.7.6";
22
23 src = fetchPypi {
24 inherit pname version;
25 sha256 = "e875efd8c57c85c2d02b238239878db59ff1971f5a823457fcc69e493bf6ebfa";
26 };
27
28 checkInputs = [
29 flake8
30 nose
31 mock
32 parameterized
33 six
34 glibcLocales
35 ];
36 preCheck =''
37 # skip because of missing convertdate module, which is an extra requirement
38 rm tests/test_jalali.py
39 '';
40
41 checkPhase = ''
42 ${python.interpreter} -m unittest discover -s tests
43 '';
44
45 # Strange
46 # AttributeError: 'module' object has no attribute 'config'
47 doCheck = false;
48
49 propagatedBuildInputs = [
50 # install_requires
51 dateutil pytz regex tzlocal
52 # extra_requires
53 jdatetime ruamel_yaml umalqurra
54 ];
55
56 meta = with lib; {
57 description = "Date parsing library designed to parse dates from HTML pages";
58 homepage = "https://github.com/scrapinghub/dateparser";
59 license = licenses.bsd3;
60 };
61}