From 58da932d40f4e387f1125c5e66ebd57cf3608c67 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 30 Oct 2023 04:20:00 +0000 Subject: [PATCH] python311Packages.scrapy: fix build --- pkgs/development/python-modules/scrapy/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index c0ec21bf6afd..88ecd6f2be8a 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -14,6 +14,7 @@ , lxml , packaging , parsel +, pexpect , protego , pydispatcher , pyopenssl @@ -42,6 +43,18 @@ buildPythonPackage rec { hash = "sha256-PL3tzgw/DgSC1hvi10WGg758188UsO5q37rduA9bNqU="; }; + patches = [ + # Fix compatiblity with Twisted>=23.8. Remove with the next release. + (fetchpatch { + url = "https://github.com/scrapy/scrapy/commit/aa95ada42cdf570f840f55c463375f8a81b303f8.patch"; + hash = "sha256-LuhA5BqtjSUgkotplvUCtvGNYOTrl0MJRCXiSBMDFzY="; + excludes = [ + "tests/CrawlerProcess/sleeping.py" + "tests/test_crawler.py" + ]; + }) + ]; + nativeBuildInputs = [ installShellFiles ]; @@ -69,6 +82,7 @@ buildPythonPackage rec { botocore glibcLocales jmespath + pexpect pytestCheckHook sybil testfixtures