2018-07-21 01:44:44 +01:00
|
|
|
{ lib, fetchPypi, buildPythonPackage
|
2017-12-12 10:33:33 +00:00
|
|
|
, nose
|
2018-02-05 23:49:10 +00:00
|
|
|
, parameterized
|
2017-12-12 10:33:33 +00:00
|
|
|
, mock
|
2020-05-10 19:07:32 +01:00
|
|
|
, flake8
|
2017-12-12 10:33:33 +00:00
|
|
|
, glibcLocales
|
|
|
|
, six
|
|
|
|
, jdatetime
|
|
|
|
, dateutil
|
|
|
|
, umalqurra
|
|
|
|
, pytz
|
|
|
|
, tzlocal
|
|
|
|
, regex
|
2020-06-07 14:36:06 +01:00
|
|
|
, ruamel_yaml
|
|
|
|
, python
|
|
|
|
, isPy3k
|
|
|
|
}:
|
2018-02-09 16:22:39 +00:00
|
|
|
|
2017-12-12 10:33:33 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dateparser";
|
2020-11-29 14:04:26 +00:00
|
|
|
version = "1.0.0";
|
2017-12-12 10:33:33 +00:00
|
|
|
|
2018-02-09 16:22:39 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:26 +00:00
|
|
|
sha256 = "159cc4e01a593706a15cd4e269a0b3345edf3aef8bf9278a57dac8adf5bf1e4a";
|
2017-12-12 10:33:33 +00:00
|
|
|
};
|
|
|
|
|
2020-06-07 14:36:06 +01:00
|
|
|
checkInputs = [
|
|
|
|
flake8
|
|
|
|
nose
|
|
|
|
mock
|
|
|
|
parameterized
|
|
|
|
six
|
|
|
|
glibcLocales
|
|
|
|
];
|
2017-12-12 10:33:33 +00:00
|
|
|
preCheck =''
|
|
|
|
# skip because of missing convertdate module, which is an extra requirement
|
|
|
|
rm tests/test_jalali.py
|
|
|
|
'';
|
|
|
|
|
2020-06-07 14:36:06 +01:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover -s tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Strange
|
|
|
|
# AttributeError: 'module' object has no attribute 'config'
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-02-09 16:22:39 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# install_requires
|
|
|
|
dateutil pytz regex tzlocal
|
|
|
|
# extra_requires
|
|
|
|
jdatetime ruamel_yaml umalqurra
|
|
|
|
];
|
2017-12-12 10:33:33 +00:00
|
|
|
|
2018-02-09 16:22:39 +00:00
|
|
|
meta = with lib; {
|
2017-12-12 10:33:33 +00:00
|
|
|
description = "Date parsing library designed to parse dates from HTML pages";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/scrapinghub/dateparser";
|
2017-12-12 10:33:33 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|