guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 77f4b98f558114e93db3510b6a8273c2a5709465
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Dec 23 19:16:50 2025 +0100

    gnu: python-cloudscraper: Switch to pyproject.
    
    * gnu/packages/python-web.scm (python-cloudscraper):
    [build-system]: Switch to pyproject-build-system.
    [arguments]<#:phases>: Replace 'check phase replacement by
    <#:test-flags>. Refresh style.
    [native-inputs]: Add python-setuptools.
    
    Change-Id: Icd0a5d262e9162a3085ace65cee6de31d18aa647
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/python-web.scm | 46 ++++++++++++++++++++-------------------------
 1 file changed, 20 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index d7f2ea4112..d1664be2e5 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -11217,35 +11217,30 @@ bare-metal installations.")
        (snippet
         '(with-directory-excursion "cloudscraper"
            (for-each delete-file
-                     '("captcha/9kw.py"
-                       "captcha/anticaptcha.py"))
+                     '("captcha/9kw.py" "captcha/anticaptcha.py"))
            (substitute* "__init__.py"
              ;; Perhaps it's a joke, but don't promote proprietary software.
              (("([Th]is feature is not available) in the .*'" _ prefix)
               (string-append prefix ".'")))))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; XXX: Dependencies, that have not yet been packaged
-         ;;      and cause an import error when included.
-         (add-after 'unpack 'drop-unsupported-sources
-           (lambda _
-             (with-directory-excursion "cloudscraper"
-               (for-each delete-file
-                         '("interpreters/v8.py")))))
-         (add-after 'unpack 'fix-references
-           (lambda _
-             (substitute* "cloudscraper/interpreters/nodejs.py"
-               (("'node'")
-                (string-append "'" (which "node") "'")))))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke "pytest" "-vv"
-                       "-k" "not 
test_getCookieString_challenge_js_challenge1_16_05_2020")))))))
-    (inputs
-     (list node-lts))
+     (list
+      #:test-flags
+      #~(list "-k" "not \
+test_getCookieString_challenge_js_challenge1_16_05_2020")
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; XXX: Dependencies, that have not yet been packaged
+          ;; and cause an import error when included.
+          (add-after 'unpack 'drop-unsupported-sources
+            (lambda _
+              (delete-file "cloudscraper/interpreters/v8.py")))
+          (add-after 'unpack 'fix-references
+            (lambda _
+              (substitute* "cloudscraper/interpreters/nodejs.py"
+                (("'node'")
+                 (string-append "'" (which "node") "'"))))))))
+    (inputs (list node-lts))
     (propagated-inputs
      (list python-js2py
            python-polling2
@@ -11253,8 +11248,7 @@ bare-metal installations.")
            python-requests-toolbelt
            python-responses
            python-pyparsing))
-    (native-inputs
-     (list python-pytest))
+    (native-inputs (list python-pytest python-setuptools))
     (home-page "https://github.com/venomous/cloudscraper";)
     (synopsis "Cloudflare anti-bot bypass")
     (description

Reply via email to