guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55474] [PATCH 11/18] gnu: Add python-beautifulsoup4-4.8.


From: Nicolas Graves
Subject: [bug#55474] [PATCH 11/18] gnu: Add python-beautifulsoup4-4.8.
Date: Tue, 17 May 2022 09:54:41 +0200

* gnu/packages/python-xyz.scm (python-beautifulsoup4-4.8): New variable.
---
 gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 308ea79075..7ae0b00ffb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9942,6 +9942,37 @@ (define-public python2-beautifulsoup4
            "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
       (arguments `(#:python ,python-2)))))
 
+(define-public python-beautifulsoup4-4.8
+  (package
+    (inherit python-beautifulsoup4)
+    (name "python-beautifulsoup4")
+    (version "4.8.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri 
"https://www.crummy.com/software/BeautifulSoup/bs4/download/4.8/beautifulsoup4-4.8.2.tar.gz";)
+       (sha256
+        (base32 "0aj6ll0zpmm32g3919xxclwincacdr6dymkscmvhha8wn1g85z85"))))
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         ;; The Python 2 source is the definitive source of beautifulsoup4. We
+         ;; must use this conversion script when building with Python 3. The
+         ;; conversion script also runs the tests.
+         ;; For more information, see the file 'convert-py3k' in the source
+         ;; distribution.
+         (add-before 'build 'convert-py3k
+           (lambda _
+             (substitute* "convert-py3k"
+               (("\\(cd py3k && python3 -m unittest discover -s bs4\\)") ""))
+             (invoke "./convert-py3k")
+             (delete-file-recursively "bs4")
+             (mkdir-p "bs4")
+             (copy-recursively "py3k/bs4" "bs4")
+             (substitute* "setup.py"
+               (("use_2to3 = True,") "")))))))))
+
 (define-public python-soupsieve
   (package
     (name "python-soupsieve")
-- 
2.36.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]