python3Packages.dateparser: fix regex compatibility
Patch by thmo (THomas Moschny) taken from https://github.com/scrapinghub/dateparser/issues/1045#issuecomment-1129846022. Also relaxes the regex version constraint.
This commit is contained in:
@@ -29,7 +29,15 @@ buildPythonPackage rec {
|
||||
sha256 = "sha256-bDup3q93Zq+pvwsy/lQy2byOMjG6C/+7813hWQMbZRU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./regex-compat.patch
|
||||
];
|
||||
|
||||
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))," \
|
||||
|
||||
Reference in New Issue
Block a user