summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-12-23 19:16:50 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-12-28 21:36:59 +0000
commit77f4b98f558114e93db3510b6a8273c2a5709465 (patch)
tree4f8b9293b67b55e1f3eb7c5733961f5c6ea79d81 /gnu/packages/python-web.scm
parent9b9411722025fa30046f77be9186472311312854 (diff)
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 <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm46
1 files changed, 20 insertions, 26 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index d7f2ea41121..d1664be2e56 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