unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python-stem.
@ 2016-08-11 14:11 ng0
  2016-08-11 16:12 ` ng0
  2016-08-11 16:26 ` ng0
  0 siblings, 2 replies; 8+ messages in thread
From: ng0 @ 2016-08-11 14:11 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 51 bytes --]

These 2 patches add python-stem and python2-stem.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-python-stem.patch --]
[-- Type: text/x-patch, Size: 2182 bytes --]

From 422e5aea16aafbc76a1480b577eef1fecfbf45ec Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Thu, 11 Aug 2016 13:42:22 +0000
Subject: [PATCH 1/2] gnu: Add python-stem.

* gnu/packages/python.scm (python-stem): New variable.
---
 gnu/packages/python.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6ff1c5c..f3245cc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -45,7 +45,7 @@
                 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
                           gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
                           isc mpl2.0 psfl public-domain repoze unlicense x11-style
-                          zpl2.1))
+                          zpl2.1 lgpl3))
   #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
@@ -9852,3 +9852,34 @@ etc.")
     (package
       (inherit base)
       (name "ptpython2"))))
+
+(define-public python-stem
+  (package
+    (name "python-stem")
+    (version "1.4.1b")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "stem" version ".tar.bz2"))
+       (sha256
+        (base32
+         "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (alist-replace
+        'check
+        (lambda _
+          (zero? (system* "./run_tests.py" "--unit")))
+        %standard-phases)))
+    (inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-mock" ,python-mock)))
+    (home-page "https://stem.torproject.org/")
+    (synopsis
+     "Stem is a Python controller library that allows applications to interact with Tor")
+    (description
+     "Stem is a Python controller library for Tor.  With it you can use Tor's
+control protocol to script against the Tor process and read descriptor data relays
+publish about themselves.")
+    (license lgpl3)))
-- 
2.9.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-python2-stem.patch --]
[-- Type: text/x-patch, Size: 741 bytes --]

From 5c2c742cddccfcfdef74aeb99f125fe4ee401a2e Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Thu, 11 Aug 2016 14:08:33 +0000
Subject: [PATCH 2/2] gnu: Add python2-stem.

* gnu/packages/python.scm (python2-stem): New variable.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f3245cc..cbdf0a6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9883,3 +9883,6 @@ etc.")
 control protocol to script against the Tor process and read descriptor data relays
 publish about themselves.")
     (license lgpl3)))
+
+(define-public python2-stem
+  (package-with-python2 python-stem))
-- 
2.9.2


[-- Attachment #1.4: Type: text/plain, Size: 82 bytes --]


-- 
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-11 14:11 [PATCH] gnu: Add python-stem ng0
@ 2016-08-11 16:12 ` ng0
  2016-08-11 16:26 ` ng0
  1 sibling, 0 replies; 8+ messages in thread
From: ng0 @ 2016-08-11 16:12 UTC (permalink / raw)
  To: guix-devel

ng0 <ng0@we.make.ritual.n0.is> writes:

> [ Unknown signature status ]
> These 2 patches add python-stem and python2-stem.
>
> From 422e5aea16aafbc76a1480b577eef1fecfbf45ec Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Thu, 11 Aug 2016 13:42:22 +0000
> Subject: [PATCH 1/2] gnu: Add python-stem.
>
> * gnu/packages/python.scm (python-stem): New variable.
> ---
>  gnu/packages/python.scm | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 6ff1c5c..f3245cc 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -45,7 +45,7 @@
>                  #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
>                            gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
>                            isc mpl2.0 psfl public-domain repoze unlicense x11-style
> -                          zpl2.1))
> +                          zpl2.1 lgpl3))
>    #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages algebra)
> @@ -9852,3 +9852,34 @@ etc.")
>      (package
>        (inherit base)
>        (name "ptpython2"))))
> +
> +(define-public python-stem
> +  (package
> +    (name "python-stem")
> +    (version "1.4.1b")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "stem" version ".tar.bz2"))
> +       (sha256
> +        (base32
> +         "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (alist-replace
> +        'check
> +        (lambda _
> +          (zero? (system* "./run_tests.py" "--unit")))
> +        %standard-phases)))
> +    (inputs
> +     `(("python-setuptools" ,python-setuptools)
> +       ("python-mock" ,python-mock)))

This should probably be native-inputs. mock is needed for tests,
setuptools only for the setup.
I have see packages doing it in inputs and native-inputs, but
native-inputs is more logical. I'll submit a changed patch and you can
pick what you like.

> +    (home-page "https://stem.torproject.org/")
> +    (synopsis
> +     "Stem is a Python controller library that allows applications to interact with Tor")
> +    (description
> +     "Stem is a Python controller library for Tor.  With it you can use Tor's
> +control protocol to script against the Tor process and read descriptor data relays
> +publish about themselves.")
> +    (license lgpl3)))
> -- 
> 2.9.2
>
> From 5c2c742cddccfcfdef74aeb99f125fe4ee401a2e Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Thu, 11 Aug 2016 14:08:33 +0000
> Subject: [PATCH 2/2] gnu: Add python2-stem.
>
> * gnu/packages/python.scm (python2-stem): New variable.
> ---
>  gnu/packages/python.scm | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index f3245cc..cbdf0a6 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -9883,3 +9883,6 @@ etc.")
>  control protocol to script against the Tor process and read descriptor data relays
>  publish about themselves.")
>      (license lgpl3)))
> +
> +(define-public python2-stem
> +  (package-with-python2 python-stem))
> -- 
> 2.9.2
>
>
> -- 
> ♥Ⓐ  ng0
> For non-prism friendly talk find me on http://www.psyced.org

-- 
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-11 14:11 [PATCH] gnu: Add python-stem ng0
  2016-08-11 16:12 ` ng0
@ 2016-08-11 16:26 ` ng0
  2016-08-12 17:56   ` Leo Famulari
  1 sibling, 1 reply; 8+ messages in thread
From: ng0 @ 2016-08-11 16:26 UTC (permalink / raw)
  To: guix-devel

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

From d6a5487d361eb667448871c42c96d9007a264214 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Thu, 11 Aug 2016 13:42:22 +0000
Subject: [PATCH] gnu: Add python-stem.

* gnu/packages/python.scm (python-stem): New variable.
---
 gnu/packages/python.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6ff1c5c..e044698 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -45,7 +45,7 @@
                 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
                           gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
                           isc mpl2.0 psfl public-domain repoze unlicense x11-style
-                          zpl2.1))
+                          zpl2.1 lgpl3))
   #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
@@ -9852,3 +9852,34 @@ etc.")
     (package
       (inherit base)
       (name "ptpython2"))))
+
+(define-public python-stem
+  (package
+    (name "python-stem")
+    (version "1.4.1b")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "stem" version ".tar.bz2"))
+       (sha256
+        (base32
+         "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (alist-replace
+        'check
+        (lambda _
+          (zero? (system* "./run_tests.py" "--unit")))
+        %standard-phases)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-mock" ,python-mock)))
+    (home-page "https://stem.torproject.org/")
+    (synopsis
+     "Stem is a Python controller library that allows applications to interact with Tor")
+    (description
+     "Stem is a Python controller library for Tor.  With it you can use Tor's
+control protocol to script against the Tor process and read descriptor data relays
+publish about themselves.")
+    (license lgpl3)))
-- 
2.9.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python2-stem.patch --]
[-- Type: text/x-patch, Size: 713 bytes --]

From e62145984db9dc694f242e2618b9644c06144a7d Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Thu, 11 Aug 2016 16:23:34 +0000
Subject: [PATCH] gnu: Add python2-stem.

* gnu/packages/python.scm (python2-stem): New variable.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e044698..d893f57 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9883,3 +9883,6 @@ etc.")
 control protocol to script against the Tor process and read descriptor data relays
 publish about themselves.")
     (license lgpl3)))
+
+(define-public python2-stem
+  (package-with-python2 python-stem))
-- 
2.9.2


[-- Attachment #3: Type: text/plain, Size: 78 bytes --]


-- 
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-11 16:26 ` ng0
@ 2016-08-12 17:56   ` Leo Famulari
  2016-08-12 18:52     ` ng0
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-08-12 17:56 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

On Thu, Aug 11, 2016 at 04:26:03PM +0000, ng0 wrote:
> From d6a5487d361eb667448871c42c96d9007a264214 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@we.make.ritual.n0.is>
> Date: Thu, 11 Aug 2016 13:42:22 +0000
> Subject: [PATCH] gnu: Add python-stem.
> 
> * gnu/packages/python.scm (python-stem): New variable.
> * gnu/packages/python.scm (python2-stem): New variable.

Thank you for these patches!

Setuptools was not used, so I removed it.

I changed 'alist-replace' to 'modify-phases'.

I added some dependencies that were missing. The tests passed without
them, but they did print some warnings.

I shortened the synopsis to satisfy `guix lint`.

I also squashed the two patches into one. That is our convention when
adding Python 2 and 3 versions of packages.

I pushed the result as b227f0be89.

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-12 17:56   ` Leo Famulari
@ 2016-08-12 18:52     ` ng0
  2016-08-12 22:47       ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: ng0 @ 2016-08-12 18:52 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Thu, Aug 11, 2016 at 04:26:03PM +0000, ng0 wrote:
>> From d6a5487d361eb667448871c42c96d9007a264214 Mon Sep 17 00:00:00 2001
>> From: ng0 <ng0@we.make.ritual.n0.is>
>> Date: Thu, 11 Aug 2016 13:42:22 +0000
>> Subject: [PATCH] gnu: Add python-stem.
>> 
>> * gnu/packages/python.scm (python-stem): New variable.
>> * gnu/packages/python.scm (python2-stem): New variable.
>
> Thank you for these patches!
>
> Setuptools was not used, so I removed it.

So python-setuptools is not needed all the when a setup.py is in place?

> I changed 'alist-replace' to 'modify-phases'.
>
> I added some dependencies that were missing. The tests passed without
> them, but they did print some warnings.
>
> I shortened the synopsis to satisfy `guix lint`.
>
> I also squashed the two patches into one. That is our convention when
> adding Python 2 and 3 versions of packages.

I see. Thank you, I wasn't sure about this.

> I pushed the result as b227f0be89.

Thanks!


Do we already have a logo which is the size of all other systems listed
on the download page of stem? I'd notify stem.torproject.org about the
addition. I know we have svg graphics and some png graphics.
For curl applies the same, I'd like to point them to a usable logo for a
web site.
-- 
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-12 18:52     ` ng0
@ 2016-08-12 22:47       ` Leo Famulari
  2016-08-13  7:02         ` ng0
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-08-12 22:47 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

On Fri, Aug 12, 2016 at 06:52:39PM +0000, ng0 wrote:
> > Setuptools was not used, so I removed it.
> 
> So python-setuptools is not needed all the when a setup.py is in place?

Sometimes it's needed, sometimes not. This time, I tried removing it,
and both python-stem and python2-stem still built.

> Do we already have a logo which is the size of all other systems listed
> on the download page of stem? I'd notify stem.torproject.org about the
> addition. I know we have svg graphics and some png graphics.
> For curl applies the same, I'd like to point them to a usable logo for a
> web site.

Take a look in the guix-artwork Git repo:

http://git.savannah.gnu.org/cgit/guix/guix-artwork.git

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-12 22:47       ` Leo Famulari
@ 2016-08-13  7:02         ` ng0
  2016-08-13 12:57           ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: ng0 @ 2016-08-13  7:02 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Fri, Aug 12, 2016 at 06:52:39PM +0000, ng0 wrote:
>> > Setuptools was not used, so I removed it.
>> 
>> So python-setuptools is not needed all the when a setup.py is in place?
>
> Sometimes it's needed, sometimes not. This time, I tried removing it,
> and both python-stem and python2-stem still built.
>
>> Do we already have a logo which is the size of all other systems listed
>> on the download page of stem? I'd notify stem.torproject.org about the
>> addition. I know we have svg graphics and some png graphics.
>> For curl applies the same, I'd like to point them to a usable logo for a
>> web site.
>
> Take a look in the guix-artwork Git repo:
>
> http://git.savannah.gnu.org/cgit/guix/guix-artwork.git

Thanks.
I know the repo, I was just wondering if there's something to link to,
or do I have to instruct them to clone it or download just for example
https://git.savannah.gnu.org/cgit/guix/guix-artwork.git/plain/website/static/base/img/GuixSD-package.png,
or can this be linked to?
-- 
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org

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

* Re: [PATCH] gnu: Add python-stem.
  2016-08-13  7:02         ` ng0
@ 2016-08-13 12:57           ` Leo Famulari
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-08-13 12:57 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

On Sat, Aug 13, 2016 at 07:02:53AM +0000, ng0 wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Fri, Aug 12, 2016 at 06:52:39PM +0000, ng0 wrote:
> >> > Setuptools was not used, so I removed it.
> >> 
> >> So python-setuptools is not needed all the when a setup.py is in place?
> >
> > Sometimes it's needed, sometimes not. This time, I tried removing it,
> > and both python-stem and python2-stem still built.
> >
> >> Do we already have a logo which is the size of all other systems listed
> >> on the download page of stem? I'd notify stem.torproject.org about the
> >> addition. I know we have svg graphics and some png graphics.
> >> For curl applies the same, I'd like to point them to a usable logo for a
> >> web site.
> >
> > Take a look in the guix-artwork Git repo:
> >
> > http://git.savannah.gnu.org/cgit/guix/guix-artwork.git
> 
> Thanks.
> I know the repo, I was just wondering if there's something to link to,
> or do I have to instruct them to clone it or download just for example
> https://git.savannah.gnu.org/cgit/guix/guix-artwork.git/plain/website/static/base/img/GuixSD-package.png,
> or can this be linked to?

I don't know; I've never looked in that repo.

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

end of thread, other threads:[~2016-08-13 12:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-11 14:11 [PATCH] gnu: Add python-stem ng0
2016-08-11 16:12 ` ng0
2016-08-11 16:26 ` ng0
2016-08-12 17:56   ` Leo Famulari
2016-08-12 18:52     ` ng0
2016-08-12 22:47       ` Leo Famulari
2016-08-13  7:02         ` ng0
2016-08-13 12:57           ` Leo Famulari

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).