2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchPypi, buildPythonPackage
|
|
|
|
, nose
|
|
|
|
, parameterized
|
|
|
|
, mock
|
2020-06-02 18:00:15 +00:00
|
|
|
, flake8
|
2020-04-24 23:36:52 +00:00
|
|
|
, glibcLocales
|
|
|
|
, six
|
|
|
|
, jdatetime
|
|
|
|
, dateutil
|
|
|
|
, umalqurra
|
|
|
|
, pytz
|
|
|
|
, tzlocal
|
|
|
|
, regex
|
2020-06-15 15:56:04 +00:00
|
|
|
, ruamel_yaml
|
|
|
|
, python
|
|
|
|
, isPy3k
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dateparser";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "0.7.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "e875efd8c57c85c2d02b238239878db59ff1971f5a823457fcc69e493bf6ebfa";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
checkInputs = [
|
|
|
|
flake8
|
|
|
|
nose
|
|
|
|
mock
|
|
|
|
parameterized
|
|
|
|
six
|
|
|
|
glibcLocales
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
preCheck =''
|
|
|
|
# skip because of missing convertdate module, which is an extra requirement
|
|
|
|
rm tests/test_jalali.py
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover -s tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Strange
|
|
|
|
# AttributeError: 'module' object has no attribute 'config'
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# install_requires
|
|
|
|
dateutil pytz regex tzlocal
|
|
|
|
# extra_requires
|
|
|
|
jdatetime ruamel_yaml umalqurra
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Date parsing library designed to parse dates from HTML pages";
|
|
|
|
homepage = "https://github.com/scrapinghub/dateparser";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|