python3Packages.dateparser: fix tests on 31st day
Our patch from PR #189312 wasn't complete; let's take the upstream one. I tested on 31st that it really passes now.
This commit is contained in:
parent
5a9ca012a5
commit
e85bc94c9d
@ -2,6 +2,7 @@
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, python-dateutil
|
||||
, pytz
|
||||
, regex
|
||||
@ -31,17 +32,17 @@ buildPythonPackage rec {
|
||||
|
||||
patches = [
|
||||
./regex-compat.patch
|
||||
(fetchpatch {
|
||||
name = "tests-31st.patch";
|
||||
url = "https://github.com/scrapinghub/dateparser/commit/b132381b9c15e560a0be5183c7d96180119a7b4f.diff";
|
||||
sha256 = "nQUWtfku5sxx/C45KJnfwvDXiccXGeVM+cQDKX9lxbE=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace \
|
||||
'regex !=2019.02.19,!=2021.8.27,<2022.3.15' \
|
||||
'regex'
|
||||
|
||||
# https://github.com/scrapinghub/dateparser/issues/1053
|
||||
substituteInPlace tests/test_search.py --replace \
|
||||
"('June 2020', datetime.datetime(2020, 6, datetime.datetime.utcnow().day, 0, 0))," \
|
||||
"('June 2020', datetime.datetime(2020, 6, min(30, datetime.datetime.utcnow().day), 0, 0)),"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
Loading…
Reference in New Issue
Block a user