all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 6/18] gnu: Add python-beautifulsoup4
@ 2016-02-15 23:28 Christopher Allan Webber
  2016-02-16  1:45 ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Allan Webber @ 2016-02-15 23:28 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0006-gnu-Add-python-beautifulsoup4.patch --]
[-- Type: text/x-patch, Size: 1929 bytes --]

From 12fea50a946441277e38cc6e7ef266c08738193e Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Sat, 13 Feb 2016 18:35:57 -0800
Subject: [PATCH 06/18] gnu: Add python-beautifulsoup4

* gnu/packages/python.scm (python-beautifulsoup4, python2-beautifulsoup4):
  New variables.
---
 gnu/packages/python.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3ef552d..d7498dd 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4573,6 +4573,39 @@ libxml2 and libxslt.")
 (define-public python2-lxml
   (package-with-python2 python-lxml))
 
+;; beautifulsoup4 has a totally different namespace than 3.x,
+;; and pypi seems to put it under its own name, so I guess we should too
+(define-public python-beautifulsoup4
+  (package
+    (name "python-beautifulsoup4")
+    (version "4.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "beautifulsoup4" version))
+       (sha256
+        (base32
+         "1d36lc4pfkvl74fmzdib2nqnvknm0jddgf2n9yd7im150qyh3m47"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-lxml" ,python-lxml)
+       ("python-html5lib" ,python-html5lib)))
+    (home-page
+     "http://www.crummy.com/software/BeautifulSoup/bs4/")
+    (synopsis
+     "Python screen-scraping library")
+    (description
+     "HTML/XML parser for quick-turnaround applications like screen-scraping.
+Can parse even extremely broken HTML.")
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
+
+(define-public python2-beautifulsoup4
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-beautifulsoup4)))
+    (inputs `(("python2-setuptools" ,python2-setuptools)))))
+
 (define-public python2-pil
   (package
     (name "python2-pil")
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 6/18] gnu: Add python-beautifulsoup4
  2016-02-15 23:28 [PATCH 6/18] gnu: Add python-beautifulsoup4 Christopher Allan Webber
@ 2016-02-16  1:45 ` Leo Famulari
  2016-02-20  0:00   ` Christopher Allan Webber
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2016-02-16  1:45 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Mon, Feb 15, 2016 at 03:28:03PM -0800, Christopher Allan Webber wrote:
> From 12fea50a946441277e38cc6e7ef266c08738193e Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Sat, 13 Feb 2016 18:35:57 -0800
> Subject: [PATCH 06/18] gnu: Add python-beautifulsoup4
> 
> * gnu/packages/python.scm (python-beautifulsoup4, python2-beautifulsoup4):
>   New variables.

I actually have a patch for this in one of my WIP branches, too :)

> ---
>  gnu/packages/python.scm | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 3ef552d..d7498dd 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -4573,6 +4573,39 @@ libxml2 and libxslt.")
>  (define-public python2-lxml
>    (package-with-python2 python-lxml))
>  
> +;; beautifulsoup4 has a totally different namespace than 3.x,
> +;; and pypi seems to put it under its own name, so I guess we should too
> +(define-public python-beautifulsoup4
> +  (package
> +    (name "python-beautifulsoup4")
> +    (version "4.4.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "beautifulsoup4" version))
> +       (sha256
> +        (base32
> +         "1d36lc4pfkvl74fmzdib2nqnvknm0jddgf2n9yd7im150qyh3m47"))))
> +    (build-system python-build-system)
> +    (inputs
> +     `(("python-lxml" ,python-lxml)
> +       ("python-html5lib" ,python-html5lib)))

I didn't find these necessary for the build process and test suite. Are
you sure they aren't supposed to be provided by the application that
uses beautifulsoup4?

> +    (home-page
> +     "http://www.crummy.com/software/BeautifulSoup/bs4/")
> +    (synopsis
> +     "Python screen-scraping library")
> +    (description
> +     "HTML/XML parser for quick-turnaround applications like screen-scraping.
> +Can parse even extremely broken HTML.")

How about this:

"Beautiful Soup is a Python library designed for rapidly setting up
screen-scraping projects.  It offers Pythonic idioms for navigating,
searching, and modifying a parse tree, providing a toolkit for
dissecting a document and extracting what you need.  It automatically
converts incoming documents to Unicode and outgoing documents to UTF-8."

> +    (license bsd-3)

It uses the Expat license, and has some code from html5lib, which is
also Expat.

> +    (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
> +
> +(define-public python2-beautifulsoup4
> +  (package
> +    (inherit (package-with-python2
> +              (strip-python2-variant python-beautifulsoup4)))
> +    (inputs `(("python2-setuptools" ,python2-setuptools)))))
> +
>  (define-public python2-pil
>    (package
>      (name "python2-pil")
> -- 
> 2.6.3
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 6/18] gnu: Add python-beautifulsoup4
  2016-02-16  1:45 ` Leo Famulari
@ 2016-02-20  0:00   ` Christopher Allan Webber
  2016-02-20  2:31     ` Christopher Allan Webber
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Allan Webber @ 2016-02-20  0:00 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari writes:

>> +;; beautifulsoup4 has a totally different namespace than 3.x,
>> +;; and pypi seems to put it under its own name, so I guess we should too
>> +(define-public python-beautifulsoup4
>> +  (package
>> +    (name "python-beautifulsoup4")
>> +    (version "4.4.1")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (pypi-uri "beautifulsoup4" version))
>> +       (sha256
>> +        (base32
>> +         "1d36lc4pfkvl74fmzdib2nqnvknm0jddgf2n9yd7im150qyh3m47"))))
>> +    (build-system python-build-system)
>> +    (inputs
>> +     `(("python-lxml" ,python-lxml)
>> +       ("python-html5lib" ,python-html5lib)))
>
> I didn't find these necessary for the build process and test suite. Are
> you sure they aren't supposed to be provided by the application that
> uses beautifulsoup4?

I think you're right in that they're optional, and can be provided or
not with the application that uses it.  I removed them.

>> +    (home-page
>> +     "http://www.crummy.com/software/BeautifulSoup/bs4/")
>> +    (synopsis
>> +     "Python screen-scraping library")
>> +    (description
>> +     "HTML/XML parser for quick-turnaround applications like screen-scraping.
>> +Can parse even extremely broken HTML.")
>
> How about this:
>
> "Beautiful Soup is a Python library designed for rapidly setting up
> screen-scraping projects.  It offers Pythonic idioms for navigating,
> searching, and modifying a parse tree, providing a toolkit for
> dissecting a document and extracting what you need.  It automatically
> converts incoming documents to Unicode and outgoing documents to UTF-8."

That's much better, thanks!

>> +    (license bsd-3)
>
> It uses the Expat license, and has some code from html5lib, which is
> also Expat.

Eep, thanks for the catch.

>> +    (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
>> +
>> +(define-public python2-beautifulsoup4
>> +  (package
>> +    (inherit (package-with-python2
>> +              (strip-python2-variant python-beautifulsoup4)))
>> +    (inputs `(("python2-setuptools" ,python2-setuptools)))))
>> +
>>  (define-public python2-pil
>>    (package
>>      (name "python2-pil")
>> -- 
>> 2.6.3
>> 
>> 

New patch of this and a bunch of others with these fixes coming as soon
as I finish churning through all this feedback ;)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 6/18] gnu: Add python-beautifulsoup4
  2016-02-20  0:00   ` Christopher Allan Webber
@ 2016-02-20  2:31     ` Christopher Allan Webber
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Allan Webber @ 2016-02-20  2:31 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 10 bytes --]

Updated.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0005-gnu-Add-python-beautifulsoup4.patch --]
[-- Type: text/x-diff, Size: 2082 bytes --]

From a95deff8a0f913352b2051d196392f2b93ccaa7d Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Sat, 13 Feb 2016 18:35:57 -0800
Subject: [PATCH 05/18] gnu: Add python-beautifulsoup4

* gnu/packages/python.scm (python-beautifulsoup4, python2-beautifulsoup4):
  New variables.
---
 gnu/packages/python.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a6823bc..8702f80 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4570,6 +4570,39 @@ libxml2 and libxslt.")
 (define-public python2-lxml
   (package-with-python2 python-lxml))
 
+;; beautifulsoup4 has a totally different namespace than 3.x,
+;; and pypi seems to put it under its own name, so I guess we should too
+(define-public python-beautifulsoup4
+  (package
+    (name "python-beautifulsoup4")
+    (version "4.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "beautifulsoup4" version))
+       (sha256
+        (base32
+         "1d36lc4pfkvl74fmzdib2nqnvknm0jddgf2n9yd7im150qyh3m47"))))
+    (build-system python-build-system)
+    (home-page
+     "http://www.crummy.com/software/BeautifulSoup/bs4/")
+    (synopsis
+     "Python screen-scraping library")
+    (description
+     "Beautiful Soup is a Python library designed for rapidly setting up
+screen-scraping projects.  It offers Pythonic idioms for navigating,
+searching, and modifying a parse tree, providing a toolkit for
+dissecting a document and extracting what you need.  It automatically
+converts incoming documents to Unicode and outgoing documents to UTF-8.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
+
+(define-public python2-beautifulsoup4
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-beautifulsoup4)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+
 (define-public python2-pil
   (package
     (name "python2-pil")
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-20  2:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 23:28 [PATCH 6/18] gnu: Add python-beautifulsoup4 Christopher Allan Webber
2016-02-16  1:45 ` Leo Famulari
2016-02-20  0:00   ` Christopher Allan Webber
2016-02-20  2:31     ` Christopher Allan Webber

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.