summary refs log tree commit diff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-09-27 21:17:21 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-09-27 21:18:43 +0100
commitbd59254b829396d050919065a879357fd0e994c7 (patch)
tree2c75d2d23d39d375b4872e322001bc9d695f157a /gnu/packages/python-web.scm
parent9a141b5bd633227ea31776b9ce7ca40928de2442 (diff)
downloadguix-bd59254b829396d050919065a879357fd0e994c7.tar.gz
gnu: python-scrapy: Update to 2.11.2, fix build.
This is a follow up fixture found during review of
<https://issues.guix.gnu.org/73070>.

* gnu/packages/python-web.scm (python-scrapy): Update to 2.11.2.
[source]: Name for source tarball has been changed in PyPI.
[arguments]: <#:test-flags>: Enable more tests which are passing now.
<#:phases>: Add 'relax-requirements and 'prepare-test-environment phases.
[propagated-inputs]: Add python-defusedxml.
[native-inputs]: Add nss-certs-for-test.

Change-Id: Ia1e1868b75d679044af83812469c2412b2bab716
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm34
1 files changed, 20 insertions, 14 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 8b29f1cd93..f32f15b8b9 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -8686,33 +8686,38 @@ regular expressions.")
 (define-public python-scrapy
   (package
     (name "python-scrapy")
-    (version "2.11.1")
+    (version "2.11.2")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "Scrapy" version))
+       (uri (pypi-uri "scrapy" version))
        (sha256
-        (base32 "1giyyzwcybmh0yf3aq44hhmf9m4k40rva418pxljpr93fjf06fkk"))))
+        (base32 "07a0nfzkz4vr1353456lavvw36l9s2ia7x91l7mzygzwhi9mdgfz"))))
     (build-system pyproject-build-system)
     (arguments
      (list #:test-flags
-           ;; Tests fail with DNS lookup or need a display.
+           ;; Tests requiring a display.
            #~(list "-k" (string-append
                          "not " (string-join
-                                 (list "test_SCRAPY_CHECK_set"
-                                       "test_check_all_default_contracts"
-                                       "test_check_cb_kwargs_contract"
-                                       "test_check_returns_items_contract"
-                                       "test_check_returns_requests_contract"
-                                       "test_check_scrapes_contract"
-                                       "test_pformat"
+                                 (list "test_pformat"
                                        "test_pformat_old_windows"
                                        "test_pformat_windows")
-                                 " and not ")))))
+                                 " and not ")))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'relax-requirements
+                 (lambda _
+                   (substitute* "setup.py"
+                     ;; "defusedxml>=0.7.1"
+                     (("0.7.1") "0.6.0"))))
+               (add-before 'check 'prepare-test-environment
+                 (lambda _
+                   (setenv "HOME" "/tmp"))))))
     (propagated-inputs
      (list python-botocore              ; Optional: For S3FeedStorage class.
            python-cryptography
            python-cssselect
+           python-defusedxml
            python-itemadapter
            python-itemloaders
            python-lxml
@@ -8728,10 +8733,11 @@ regular expressions.")
            python-w3lib
            python-zope-interface))
     (native-inputs
-     (list python-pexpect
+     (list nss-certs-for-test
+           python-pexpect
+           python-pyftpdlib
            python-pytest
            python-pytest-xdist
-           python-pyftpdlib
            python-sybil
            python-testfixtures
            python-uvloop))