all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 00/16] Add onionshare
@ 2016-09-11 18:58 Efraim Flashner
  2016-09-11 18:58 ` [PATCH 01/16] gnu: Add python-pika Efraim Flashner
                   ` (16 more replies)
  0 siblings, 17 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

When I started this seemed like an easy way to share files. I'm not
entirely happy with the number of packages that I ended up putting in
python.scm, grapql-* seems like it could be broken off, django ones could
go in Hartmut's django.scm. Python-nautilus doesn't seem to belong
anywhere. I'd like to move all the sqlalchemy packages to databases.scm,
but I don't think there's anything we can do about python.scm hitting
10k+ lines.

python-nautilus can be upgraded to 0.5.x, but it involves packaging more
python packages, so I figured that could wait until later.

I've also included my "master file" that I pulled the patches from, it
makes building all the patches a bit easier to only have to drop in one
file than to apply 16 patches.


Efraim Flashner (16):
  gnu: Add python-pika.
  gnu: Add python-peewee.
  gnu: Add python-promise.
  gnu: Add python-pytest-mock.
  gnu: Add python-graphql-core.
  gnu: Add python-graphql-relay.
  gnu: Add python-sqlalchemy-utils.
  gnu: Add python-pytest-django.
  gnu: Add python-django-filter.
  gnu: Add python-graphene.
  gnu: Add python-consul.
  gnu: Add python-cov-core.
  gnu: Add python-nose2.
  gnu: Add python-bcrypt.
  gnu: Add python-nautilus.
  gnu: Add onionshare.

 gnu/local.mk                                       |   1 +
 gnu/packages/databases.scm                         |  30 ++
 gnu/packages/password-utils.scm                    |  35 ++
 .../patches/onionshare-fix-install-paths.patch     |  39 ++
 gnu/packages/python.scm                            | 452 ++++++++++++++++++++-
 gnu/packages/tor.scm                               | 100 +++++
 6 files changed, 656 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/onionshare-fix-install-paths.patch

-- 
2.10.0

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

* [PATCH 01/16] gnu: Add python-pika.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 19:36   ` David Craven
  2016-09-11 18:58 ` [PATCH 02/16] gnu: Add python-peewee Efraim Flashner
                   ` (15 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8b9273c..101e7f1 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9199,6 +9199,31 @@ focus on event-based network programming and multiprotocol integration.")
 (define-public python2-twisted
   (package-with-python2 python-twisted))
 
+(define-public python-pika
+  (package
+    (name "python-pika")
+    (version "0.10.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "pika" version))
+        (sha256
+         (base32
+          "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-twisted" ,python-twisted)))
+    (home-page "https://pika.readthedocs.org")
+    (synopsis "Pure Python AMQP Client Library")
+    (description
+     "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
+Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
+network support library.")
+    (license license:bsd-3)))
+
+(define-public python2-pika
+  (package-with-python2 python-pika))
+
 (define-public python-ply
   (package
     (name "python-ply")
-- 
2.10.0

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

* [PATCH 02/16] gnu: Add python-peewee.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
  2016-09-11 18:58 ` [PATCH 01/16] gnu: Add python-pika Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 03/16] gnu: Add python-promise Efraim Flashner
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/databases.scm (python-peewee): New variable.
---
 gnu/packages/databases.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index fc31653..85bbca1 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -63,6 +63,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system cmake)
   #:use-module (guix utils)
   #:use-module (srfi srfi-26)
@@ -1094,3 +1095,32 @@ trees (LSM), for sustained throughput under random insert workloads.")
     (synopsis "Lightning memory-mapped database library")
     (description "Lightning memory-mapped database library.")
     (license license:openldap2.8)))
+
+(define-public python-peewee
+  (package
+    (name "python-peewee")
+    (version "2.8.3")
+      (source
+        (origin
+        (method url-fetch)
+        (uri (pypi-uri "peewee" version))
+        (sha256
+         (base32
+          "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; Fails to import test data
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (home-page "https://github.com/coleifer/peewee/")
+    (synopsis "Small object-relational mapping utility")
+    (description
+     "Peewee is a simple and small ORM (object-relation mapping) tool.  Peewee
+handles converting between pythonic values and those used by databases, so you
+can use Python types in your code without having to worry.  It has built-in
+support for sqlite, mysql and postgresql.  If you already have a database, you
+can autogenerate peewee models using @code{pwiz}, a model generator.")
+    (license license:expat)))
+
+(define-public python2-peewee
+  (package-with-python2 python-peewee))
-- 
2.10.0

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

* [PATCH 03/16] gnu: Add python-promise.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
  2016-09-11 18:58 ` [PATCH 01/16] gnu: Add python-pika Efraim Flashner
  2016-09-11 18:58 ` [PATCH 02/16] gnu: Add python-peewee Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 19:41   ` David Craven
  2016-09-11 18:58 ` [PATCH 04/16] gnu: Add python-pytest-mock Efraim Flashner
                   ` (13 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 101e7f1..a340604 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -7441,6 +7441,40 @@ asynchronously executing callables.  This package backports the
 concurrent.futures package from Python 3.2")
     (license license:bsd-3)))
 
+(define-public python-promise
+  (package
+    (name "python-promise")
+    (version "0.4.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "promise" version))
+        (sha256
+         (base32
+          "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
+    (build-system python-build-system)
+    ;; Tests wants python-futures, which is a python2 only program, and
+    ;; can't be found by python2-promise at test time.
+    (arguments `(#:tests? #f))
+    (home-page "https://github.com/syrusakbary/promise")
+    (synopsis "Promises/A+ implementation for Python")
+    (description
+     "Promises/A+ implementation for Python")
+    (properties `((python2-variant . ,(delay python2-promise))))
+    (license license:expat)))
+
+(define-public python2-promise
+  (let ((promise (package-with-python2
+                   (strip-python2-variant python-promise))))
+    (package (inherit promise)
+      (arguments (substitute-keyword-arguments (package-arguments promise)
+                   ((#:tests? _) #t)))
+      (native-inputs
+       `(("python2-futures" ,python2-futures)
+         ("python2-pytest" ,python2-pytest)
+         ("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs promise))))))
+
 (define-public python-urllib3
   (package
     (name "python-urllib3")
-- 
2.10.0

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

* [PATCH 04/16] gnu: Add python-pytest-mock.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (2 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 03/16] gnu: Add python-promise Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 19:42   ` David Craven
  2016-09-11 18:58 ` [PATCH 05/16] gnu: Add python-graphql-core Efraim Flashner
                   ` (12 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-pytest-mock): New variable.
---
 gnu/packages/python.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a340604..0886c4f 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1683,6 +1683,45 @@ supports coverage of subprocesses.")
 (define-public python2-pytest-runner
   (package-with-python2 python-pytest-runner))
 
+(define-public python-pytest-mock
+  (package
+    (name "python-pytest-mock")
+    (version "1.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "pytest-mock" version ".zip"))
+        (sha256
+         (base32
+          "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("python-py" ,python-py)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/pytest-dev/pytest-mock/")
+    (synopsis "Thin-wrapper around the mock package for easier use with py.test")
+    (description
+     "This plugin installs a @code{mocker} fixture which is a thin-wrapper
+around the patching API provided by the @code{mock} package, but with the
+benefit of not having to worry about undoing patches at the end of a test.
+The mocker fixture has the same API as @code{mock.patch}, supporting the
+same arguments.")
+    (properties `((python2-variant . ,(delay python2-pytest-mock))))
+    (license license:expat)))
+
+(define-public python2-pytest-mock
+  (let ((base (package-with-python2
+                (strip-python2-variant python-pytest-mock))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base)))
+      (inputs
+       `(("python2-mock" ,python2-mock)
+         ,@(package-inputs base))))))
+
 (define-public python-pytest-xdist
   (package
     (name "python-pytest-xdist")
-- 
2.10.0

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

* [PATCH 05/16] gnu: Add python-graphql-core.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (3 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 04/16] gnu: Add python-pytest-mock Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 06/16] gnu: Add python-graphql-relay Efraim Flashner
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-graphql-core): New variable.
---
 gnu/packages/python.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0886c4f..a4493c5 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10425,3 +10425,48 @@ Python to manipulate OpenDocument 1.2 files.")
              (native-inputs
               `(("python2-setuptools" ,python2-setuptools)
                 ,@(package-native-inputs base))))))
+
+(define-public python-graphql-core
+  (package
+    (name "python-graphql-core")
+    (version "0.5.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "graphql-core" version))
+        (sha256
+         (base32
+          "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-hardcoded-version
+           (lambda _ (substitute*
+                       "setup.py"
+                       (("'gevent==1.1rc1'") "'gevent'"))
+             #t)))))
+    (native-inputs
+     `(("python-gevent" ,python-gevent)
+       ("python-mock" ,python-mock)
+       ("python-pytest-mock" ,python-pytest-mock)))
+    (inputs
+     `(("python-promise" ,python-promise)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/graphql-python/graphql-core")
+    (synopsis "GraphQL implementation for Python")
+    (description
+     "GraphQL implementation for Python.  GraphQL is a data query language and
+runtime designed and used to request and deliver data to mobile and web apps.
+This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
+to Python.")
+    (properties `((python2-variant . ,(delay python2-graphql-core))))
+    (license license:expat)))
+
+(define-public python2-graphql-core
+  (let ((base (package-with-python2
+                (strip-python2-variant python-graphql-core))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
-- 
2.10.0

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

* [PATCH 06/16] gnu: Add python-graphql-relay.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (4 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 05/16] gnu: Add python-graphql-core Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 19:38   ` David Craven
  2016-09-11 18:58 ` [PATCH 07/16] gnu: Add python-sqlalchemy-utils Efraim Flashner
                   ` (10 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-graphql-relay): New variable.
---
 gnu/packages/python.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a4493c5..0ef9b6a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10470,3 +10470,40 @@ to Python.")
       (native-inputs
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
+
+(define-public python-graphql-relay
+  (package
+    (name "python-graphql-relay")
+    (version "0.4.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "graphql-relay" version))
+        (sha256
+         (base32
+          "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (inputs
+     `(("python-graphql-core" ,python-graphql-core)
+       ("python-promise" ,python-promise)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/graphql-python/graphql-relay-py")
+    (synopsis "Relay implementation for Python")
+    (description
+     "This is a library to allow the easy creation of Relay-compliant servers
+using the GraphQL Python reference implementation of a GraphQL server.  It
+should be noted that the code is a exact port of the original
+@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
+from Facebook.")
+    (properties `((python2-variant . ,(delay python2-graphql-relay))))
+    (license license:expat)))
+
+(define-public python2-graphql-relay
+  (let ((base (package-with-python2
+                (strip-python2-variant python-graphql-relay))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
-- 
2.10.0

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

* [PATCH 07/16] gnu: Add python-sqlalchemy-utils.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (5 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 06/16] gnu: Add python-graphql-relay Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 08/16] gnu: Add python-pytest-django Efraim Flashner
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0ef9b6a..91d82aa 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3694,6 +3694,37 @@ simple and Pythonic domain language.")
 (define-public python2-sqlalchemy
   (package-with-python2 python-sqlalchemy))
 
+(define-public python-sqlalchemy-utils
+  (package
+    (name "python-sqlalchemy-utils")
+    (version "0.32.9")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "SQLAlchemy-Utils" version))
+        (sha256
+         (base32
+          "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-six" ,python-six)
+       ("python-sqlalchemy" ,python-sqlalchemy)))
+    (home-page "https://github.com/kvesteri/sqlalchemy-utils")
+    (synopsis "Various utility functions for SQLAlchemy")
+    (description
+     "SQLAlchemy-utils provides various utility functions and custom data types
+for SQLAlchemy.  SQLAlchemy is an SQL database abstraction library for Python.")
+    (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
+    (license license:bsd-3)))
+
+(define-public python2-sqlalchemy-utils
+  (let ((base (package-with-python2
+                (strip-python2-variant python-sqlalchemy-utils))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-alembic
   (package
     (name "python-alembic")
-- 
2.10.0

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

* [PATCH 08/16] gnu: Add python-pytest-django.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (6 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 07/16] gnu: Add python-sqlalchemy-utils Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 09/16] gnu: Add python-django-filter Efraim Flashner
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-pytest-django): New variable.
---
 gnu/packages/python.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 91d82aa..36b96f6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1722,6 +1722,46 @@ same arguments.")
        `(("python2-mock" ,python2-mock)
          ,@(package-inputs base))))))
 
+(define-public python-pytest-django
+  (package
+    (name "python-pytest-django")
+    (version "2.9.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "pytest-django" version))
+        (sha256
+         (base32
+          "1mmc7zsz3dlhs6sx4sppkj1vgshabi362r1a8b8wpj1qfximpqcb"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-setuppy
+           (lambda _
+             (substitute* "setup.py"
+                          (("setuptools_scm==1.8.0") "setuptools_scm"))
+             #t)))))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (inputs
+     `(("python-py" ,python-py)
+       ("python-pytest" ,python-pytest)))
+    (home-page "http://pytest-django.readthedocs.org/")
+    (synopsis "Django plugin for py.test")
+    (description "Pytest-django is a plugin for py.test that provides a set of
+useful tools for testing Django applications and projects.")
+    (properties `((python2-variant . ,(delay python2-pytest-django))))
+    (license license:bsd-3)))
+
+(define-public python2-pytest-django
+  (let ((base (package-with-python2
+                (strip-python2-variant python-pytest-django))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-pytest-xdist
   (package
     (name "python-pytest-xdist")
-- 
2.10.0

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

* [PATCH 09/16] gnu: Add python-django-filter.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (7 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 08/16] gnu: Add python-pytest-django Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 10/16] gnu: Add python-graphene Efraim Flashner
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-django-filter): New variable.
---
 gnu/packages/python.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 36b96f6..7effc67 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1762,6 +1762,36 @@ useful tools for testing Django applications and projects.")
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
 
+(define-public python-django-filter
+  (package
+    (name "python-django-filter")
+    (version "0.14.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "django-filter" version))
+        (sha256
+         (base32
+          "0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
+    (build-system python-build-system)
+    (home-page "https://django-filter.readthedocs.io/en/latest/")
+    (synopsis "Reusable Django application to filter querysets dynamically")
+    (description
+     "Django-filter is a generic, reusable application to alleviate writing
+some of the more mundane bits of view code.  Specifically, it allows users to
+filter down a queryset based on a model’s fields, displaying the form to let
+them do this.")
+    (properties `((python2-variant . ,(delay python2-django-filter))))
+    (license license:bsd-3)))
+
+(define-public python2-django-filter
+  (let ((base (package-with-python2
+                (strip-python2-variant python-django-filter))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-pytest-xdist
   (package
     (name "python-pytest-xdist")
-- 
2.10.0

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

* [PATCH 10/16] gnu: Add python-graphene.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (8 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 09/16] gnu: Add python-django-filter Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 11/16] gnu: Add python-consul Efraim Flashner
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 7effc67..5ab8ed1 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10608,3 +10608,45 @@ from Facebook.")
       (native-inputs
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
+
+(define-public python-graphene
+  (package
+    (name "python-graphene")
+    (version "0.10.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "graphene" version))
+        (sha256
+         (base32
+          "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-django-filter" ,python-django-filter)
+       ("python-mock" ,python-mock)
+       ("python-psycopg2" ,python-psycopg2)
+       ("python-pytest-django" ,python-pytest-django)
+       ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
+    (inputs
+     `(("python-graphql-core" ,python-graphql-core)
+       ("python-graphql-relay" ,python-graphql-relay)
+       ("python-iso8601" ,python-iso8601)
+       ("python-promise" ,python-promise)
+       ("python-six" ,python-six)))
+    (home-page "http://graphene-python.org/")
+    (synopsis "GraphQL Framework for Python")
+    (description
+     "Graphene is a Python library for building GraphQL schemas/types.
+A GraphQL schema describes your data model, and provides a GraphQL server
+with an associated set of resolve methods that know how to fetch data.")
+    (properties `((python2-variant . ,(delay python2-graphene))))
+    (license license:expat)))
+
+(define-public python2-graphene
+  (let ((base (package-with-python2
+                (strip-python2-variant python-graphene))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ("python2-sqlalchemy" ,python2-sqlalchemy)
+         ,@(package-native-inputs base))))))
-- 
2.10.0

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

* [PATCH 11/16] gnu: Add python-consul.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (9 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 10/16] gnu: Add python-graphene Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 12/16] gnu: Add python-cov-core Efraim Flashner
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5ab8ed1..4d151a3 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10284,6 +10284,36 @@ interface for programs.")
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
 
+(define-public python-consul
+  (package
+    (name "python-consul")
+    (version "0.6.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "python-consul" version))
+        (sha256
+         (base32
+          "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-requests" ,python-requests)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/cablehead/python-consul")
+    (synopsis "Python client for Consul")
+    (description
+     "Python client for @url{http://www.consul.io/,Consul}, a tool for service
+discovery, monitoring and configuration.")
+    (license license:expat)))
+
+(define-public python2-consul
+  (let ((consul (package-with-python2 python-consul)))
+    (package (inherit consul)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs consul))))))
+
 (define-public python-schematics
   (package
     (name "python-schematics")
-- 
2.10.0

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

* [PATCH 12/16] gnu: Add python-cov-core.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (10 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 11/16] gnu: Add python-consul Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 13/16] gnu: Add python-nose2 Efraim Flashner
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-cov-core): New variable.
---
 gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4d151a3..81c706d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2172,6 +2172,34 @@ executed.")
 (define-public python2-coverage
   (package-with-python2 python-coverage))
 
+(define-public python-cov-core
+  (package
+    (name "python-cov-core")
+    (version "1.15.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "cov-core" version))
+        (sha256
+         (base32
+          "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-coverage" ,python-coverage)))
+    (home-page "https://github.com/schlamar/cov-core")
+    (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
+    (description
+     "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
+It is useful for developing coverage plugins for these testing frameworks.")
+    (license license:expat)))
+
+(define-public python2-cov-core
+  (let ((cov-core (package-with-python2 python-cov-core)))
+    (package (inherit cov-core)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs cov-core))))))
+
 (define-public python-discover
   (package
     (name "python-discover")
-- 
2.10.0

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

* [PATCH 13/16] gnu: Add python-nose2.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (11 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 12/16] gnu: Add python-cov-core Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 19:39   ` David Craven
  2016-09-11 18:58 ` [PATCH 14/16] gnu: Add python-bcrypt Efraim Flashner
                   ` (3 subsequent siblings)
  16 siblings, 1 reply; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 81c706d..94ebd7d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1505,6 +1505,37 @@ matching them against a list of media-ranges.")
 (define-public python2-nose
   (package-with-python2 python-nose))
 
+(define-public python-nose2
+  (package
+    (name "python-nose2")
+    (version "0.6.5")
+      (source
+        (origin
+          (method url-fetch)
+          (uri (pypi-uri "nose2" version))
+          (sha256
+           (base32
+            "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (inputs
+     `(("python-cov-core" ,python-cov-core)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/nose-devs/nose2")
+    (synopsis "Next generation of nicer testing for Python")
+    (description
+     "Nose2 is the next generation of nicer testing for Python, based on the
+plugins branch of unittest2.  Nose2 aims to improve on nose by providing a
+better plugin api, being easier for users to configure, and simplifying internal
+interfaces and processes.")
+    (license license:bsd-2)))
+
+(define-public python2-nose2
+  (package-with-python2 python-nose2))
+
 (define-public python-unittest2
   (package
     (name "python-unittest2")
-- 
2.10.0

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

* [PATCH 14/16] gnu: Add python-bcrypt.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (12 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 13/16] gnu: Add python-nose2 Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 15/16] gnu: Add python-nautilus Efraim Flashner
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/password-utils.scm (python-bcrypt): New variable.
---
 gnu/packages/password-utils.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 7288da6..d2410c6 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -334,3 +334,38 @@ through the pass command.")
     (description "Argon2 provides a key derivation function that was declared
 winner of the 2015 Password Hashing Competition.")
     (license license:cc0)))
+
+(define-public python-bcrypt
+  (package
+    (name "python-bcrypt")
+    (version "3.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "bcrypt" version))
+        (sha256
+         (base32
+          "1giy0dvd8gvq6flxh44np1v2nqwsji5qsnrz038mgwzgp7c20j75"))))
+        (build-system python-build-system)
+    (native-inputs
+     `(("python-pycparser" ,python-pycparser)
+       ("python-pytest" ,python-pytest)))
+    (inputs
+     `(("python-cffi" ,python-cffi)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/pyca/bcrypt/")
+    (synopsis
+     "Modern password hashing library")
+    (description
+     "Bcrypt is a Python module which provides a password hashing method based
+on the Blowfish password hashing algorithm, as described in
+@url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
+Password Scheme\"} by Niels Provos and David Mazieres.")
+    (license license:asl2.0)))
+
+(define-public python2-bcrypt
+  (let ((bcrypt (package-with-python2 python-bcrypt)))
+    (package (inherit bcrypt)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs bcrypt))))))
-- 
2.10.0

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

* [PATCH 15/16] gnu: Add python-nautilus.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (13 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 14/16] gnu: Add python-bcrypt Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 18:58 ` [PATCH 16/16] gnu: Add onionshare Efraim Flashner
  2016-09-11 19:00 ` [PATCH 00/16] " Efraim Flashner
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-nautilus): New variable.
---
 gnu/packages/python.scm | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 94ebd7d..aadded2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -70,6 +70,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages password-utils)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -88,7 +89,6 @@
   #:use-module (gnu packages zip)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages bdw-gc)
-  #:use-module (gnu packages pcre)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -10739,3 +10739,41 @@ with an associated set of resolve methods that know how to fetch data.")
        `(("python2-setuptools" ,python2-setuptools)
          ("python2-sqlalchemy" ,python2-sqlalchemy)
          ,@(package-native-inputs base))))))
+
+(define-public python-nautilus
+  (package
+    (name "python-nautilus")
+    (version "0.4.9")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "nautilus" version))
+        (sha256
+         (base32
+          "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f)) ; fails to import test modules
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (inputs
+     `(("python-bcrypt" ,python-bcrypt)
+       ("python-click" ,python-click)
+       ("python-consul" ,python-consul)
+       ("python-graphql-core" ,python-graphql-core)
+       ("python-graphql-relay" ,python-graphql-relay)
+       ("python-graphene" ,python-graphene)
+       ("python-jinja2" ,python-jinja2)
+       ("python-nose2" ,python-nose2)
+       ("python-peewee" ,python-peewee)
+       ("python-pika" ,python-pika)
+       ("python-pycparser" ,python-pycparser)
+       ("python-requests" ,python-requests)
+       ("python-tornado" ,python-tornado)
+       ("python-wtforms" ,python-wtforms)))
+    (home-page "https://github.com/AlecAivazis/nautilus")
+    (synopsis "Library for creating microservice applications")
+    (description
+     "Nautilus is a framework for flux based microservices that looks to
+provide extendible implementations of common aspects of a cloud so that you can
+focus on building massively scalable web applications.")
+    (license license:expat)))
-- 
2.10.0

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

* [PATCH 16/16] gnu: Add onionshare.
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (14 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 15/16] gnu: Add python-nautilus Efraim Flashner
@ 2016-09-11 18:58 ` Efraim Flashner
  2016-09-11 19:00 ` [PATCH 00/16] " Efraim Flashner
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 18:58 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/tor.scm (onionshare): New variable.
* gnu/packages/patches/onionshare-fix-install-paths.patch: New variable.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                       |   1 +
 .../patches/onionshare-fix-install-paths.patch     |  39 ++++++++
 gnu/packages/tor.scm                               | 100 +++++++++++++++++++++
 3 files changed, 140 insertions(+)
 create mode 100644 gnu/packages/patches/onionshare-fix-install-paths.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 515ca35..1999323 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -701,6 +701,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-db4.patch				\
   %D%/packages/patches/ocaml-CVE-2015-8869.patch		\
   %D%/packages/patches/ocaml-findlib-make-install.patch	\
+  %D%/packages/patches/onionshare-fix-install-paths.patch		\
   %D%/packages/patches/openexr-missing-samples.patch		\
   %D%/packages/patches/openjpeg-CVE-2015-6581.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch		\
diff --git a/gnu/packages/patches/onionshare-fix-install-paths.patch b/gnu/packages/patches/onionshare-fix-install-paths.patch
new file mode 100644
index 0000000..721b89f
--- /dev/null
+++ b/gnu/packages/patches/onionshare-fix-install-paths.patch
@@ -0,0 +1,39 @@
+From 7afdd3366711a0c508bfb9323af8f4268ab77c9b Mon Sep 17 00:00:00 2001
+From: Efraim Flashner <efraim@flashner.co.il>
+Date: Thu, 21 Jul 2016 13:22:45 +0300
+Subject: [PATCH] patch
+
+---
+ setup.py | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 8ae56fe..8b245c9 100644
+--- a/setup.py
++++ b/setup.py
+@@ -91,15 +91,15 @@ setup(
+     include_package_data=True,
+     scripts=['install/scripts/onionshare', 'install/scripts/onionshare-gui'],
+     data_files=[
+-        (os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']),
+-        (os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']),
+-        (os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']),
+-        (os.path.join(sys.prefix, 'share/onionshare'), [
++        ('share/applications', ['install/onionshare.desktop']),
++        ('share/appdata', ['install/onionshare.appdata.xml']),
++        ('share/pixmaps', ['install/onionshare80.xpm']),
++        ('share/onionshare', [
+             'resources/version.txt',
+             'resources/wordlist.txt'
+         ]),
+-        (os.path.join(sys.prefix, 'share/onionshare/images'), images),
+-        (os.path.join(sys.prefix, 'share/onionshare/locale'), locale),
+-        (os.path.join(sys.prefix, 'share/onionshare/html'), html)
++        ('share/onionshare/images', images),
++        ('share/onionshare/locale', locale),
++        ('share/onionshare/html', html)
+     ]
+ )
+-- 
+2.9.1
+
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 951b8f6..fe74c3c 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages w3m))
@@ -145,3 +146,102 @@ flexible configuration and can be customized to suit individual needs and
 tastes.  It has application for both stand-alone systems and multi-user
 networks.")
     (license gpl2+)))
+
+(define-public onionshare
+  (package
+    (name "onionshare")
+    (version "0.9")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/micahflee/onionshare/archive/v"
+                            version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0pc3xbq379415s0i0y6rz02hay20zbvgra1jmg4mgrl9vbdr8zmw"))
+        (patches (search-patches "onionshare-fix-install-paths.patch"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-install-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out        (assoc-ref outputs "out"))
+                    (onionshare (string-append out "/share/onionshare")))
+               (substitute*
+                 "install/pyinstaller.spec"
+                 ;; inform onionshare where the 'resources' files are installed
+                 (("../resources") onionshare))
+               (substitute*
+                 "onionshare/strings.py"
+                 ;; correct the locale directory
+                 (("helpers.get_resource_path\\('locale'\\)")
+                  (string-append "'" onionshare "/locale'")))
+               (substitute*
+                 "onionshare/helpers.py"
+                 ;; correct the location of version.txt
+                 (("/usr") out)
+                 (("get_resource_path\\('version.txt'\\)")
+                  (string-append "'" onionshare "/version.txt'"))
+                 (("get_resource_path\\('wordlist.txt'\\)")
+                  (string-append "'" onionshare "/wordlist.txt'")))
+               (substitute*
+                 "onionshare/web.py"
+                 ;; fix the location of the html files
+                 (("helpers.get_resource_path\\('html/denied.html'\\)")
+                  (string-append "'" onionshare "/html/denied.html'"))
+                 (("helpers.get_resource_path\\('html/404.html'\\)")
+                  (string-append "'" onionshare "/html/404.html'"))
+                 (("helpers.get_resource_path\\('html/index.html'\\)")
+                  (string-append "'" onionshare "/html/index.html'")))
+               (substitute*
+                 "onionshare_gui/file_selection.py"
+                 (("helpers.get_resource_path\\('images/drop_files.png'\\)")
+                  (string-append "'" onionshare "/images/drop_files.png'")))
+               (substitute*
+                 "onionshare_gui/server_status.py"
+                 (("helpers.get_resource_path\\('images/server_stopped.png'\\)")
+                  (string-append "'" onionshare "/images/server_stopped.png'"))
+                 (("helpers.get_resource_path\\('images/server_working.png'\\)")
+                  (string-append "'" onionshare "/images/server_working.png'"))
+                 (("helpers.get_resource_path\\('images/server_started.png'\\)")
+                  (string-append "'" onionshare "/images/server_started.png'")))
+               (substitute*
+                 "onionshare_gui/onionshare_gui.py"
+                 (("helpers.get_resource_path\\('images/logo.png'\\)")
+                  (string-append "'" onionshare "/images/logo.png'")))
+               (substitute*
+                 "install/onionshare.desktop"
+                 (("/usr") out))
+             #t)))
+         (delete 'check)
+         (add-before 'strip 'tests
+           ;; After all the patching we run the tests after installing.
+           ;; This is also a known issue:
+           ;; https://github.com/micahflee/onionshare/issues/284
+           (lambda _ (zero? (system* "nosetests" "test")))))
+       ;; can't compress the egg because it expects to find all the resources
+       ;; inside the egg as though it were a folder.
+       #:configure-flags '("--single-version-externally-managed" "--root=/")
+       ))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (inputs
+     `(("python-flask" ,python-flask)
+       ("python-nautilus" ,python-nautilus)
+       ("python-sip" ,python-sip)
+       ("python-stem" ,python-stem)
+       ("python-pyqt" ,python-pyqt)))
+    (home-page "https://onionshare.org/")
+    (synopsis "Securely and anonymously share files")
+    (description "OnionShare lets you securely and anonymously share files of
+any size.  It works by starting a web server, making it accessible as a Tor
+hidden service, and generating an unguessable URL to access and download the
+files.  It doesn't require setting up a server on the internet somewhere or
+using a third party filesharing service.  You host the file on your own computer
+and use a Tor hidden service to make it temporarily accessible over the
+internet.  The other user just needs to use Tor Browser to download the file
+from you.")
+    (license (list license:gpl3+
+                   license:bsd-3)))) ; onionshare/socks.py
-- 
2.10.0

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

* Re: [PATCH 00/16] Add onionshare
  2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
                   ` (15 preceding siblings ...)
  2016-09-11 18:58 ` [PATCH 16/16] gnu: Add onionshare Efraim Flashner
@ 2016-09-11 19:00 ` Efraim Flashner
  16 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-11 19:00 UTC (permalink / raw)
  To: guix-devel


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

On Sun, Sep 11, 2016 at 09:58:41PM +0300, Efraim Flashner wrote:
> When I started this seemed like an easy way to share files. I'm not
> entirely happy with the number of packages that I ended up putting in
> python.scm, grapql-* seems like it could be broken off, django ones could
> go in Hartmut's django.scm. Python-nautilus doesn't seem to belong
> anywhere. I'd like to move all the sqlalchemy packages to databases.scm,
> but I don't think there's anything we can do about python.scm hitting
> 10k+ lines.
> 
> python-nautilus can be upgraded to 0.5.x, but it involves packaging more
> python packages, so I figured that could wait until later.
> 
> I've also included my "master file" that I pulled the patches from, it
> makes building all the patches a bit easier to only have to drop in one
> file than to apply 16 patches.
> 
> 
> Efraim Flashner (16):
>   gnu: Add python-pika.
>   gnu: Add python-peewee.
>   gnu: Add python-promise.
>   gnu: Add python-pytest-mock.
>   gnu: Add python-graphql-core.
>   gnu: Add python-graphql-relay.
>   gnu: Add python-sqlalchemy-utils.
>   gnu: Add python-pytest-django.
>   gnu: Add python-django-filter.
>   gnu: Add python-graphene.
>   gnu: Add python-consul.
>   gnu: Add python-cov-core.
>   gnu: Add python-nose2.
>   gnu: Add python-bcrypt.
>   gnu: Add python-nautilus.
>   gnu: Add onionshare.
> 
>  gnu/local.mk                                       |   1 +
>  gnu/packages/databases.scm                         |  30 ++
>  gnu/packages/password-utils.scm                    |  35 ++
>  .../patches/onionshare-fix-install-paths.patch     |  39 ++
>  gnu/packages/python.scm                            | 452 ++++++++++++++++++++-
>  gnu/packages/tor.scm                               | 100 +++++
>  6 files changed, 656 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/onionshare-fix-install-paths.patch
> 
> -- 
> 2.10.0
> 

And here's the onionshare.scm that I was using

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: onionshare.scm --]
[-- Type: text/plain, Size: 25180 bytes --]

;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is an addendum to GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (wip onionshare)
  #:use-module (gnu packages)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix build-system python)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages python)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages zip))

(define-public onionshare
  (package
    (name "onionshare")
    (version "0.9")
    (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/micahflee/onionshare/archive/v"
                            version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
          "0pc3xbq379415s0i0y6rz02hay20zbvgra1jmg4mgrl9vbdr8zmw"))
        (patches (search-patches "onionshare-fix-install-paths.patch"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-install-path
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out        (assoc-ref outputs "out"))
                    (onionshare (string-append out "/share/onionshare")))
               (substitute*
                 "install/pyinstaller.spec"
                 ;; inform onionshare where the 'resources' files are installed
                 (("../resources") onionshare))
               (substitute*
                 "onionshare/strings.py"
                 ;; correct the locale directory
                 (("helpers.get_resource_path\\('locale'\\)")
                  (string-append "'" onionshare "/locale'")))
               (substitute*
                 "onionshare/helpers.py"
                 ;; correct the location of version.txt
                 (("/usr") out)
                 (("get_resource_path\\('version.txt'\\)")
                  (string-append "'" onionshare "/version.txt'"))
                 (("get_resource_path\\('wordlist.txt'\\)")
                  (string-append "'" onionshare "/wordlist.txt'")))
               (substitute*
                 "onionshare/web.py"
                 ;; fix the location of the html files
                 (("helpers.get_resource_path\\('html/denied.html'\\)")
                  (string-append "'" onionshare "/html/denied.html'"))
                 (("helpers.get_resource_path\\('html/404.html'\\)")
                  (string-append "'" onionshare "/html/404.html'"))
                 (("helpers.get_resource_path\\('html/index.html'\\)")
                  (string-append "'" onionshare "/html/index.html'")))
               (substitute*
                 "onionshare_gui/file_selection.py"
                 (("helpers.get_resource_path\\('images/drop_files.png'\\)")
                  (string-append "'" onionshare "/images/drop_files.png'")))
               (substitute*
                 "onionshare_gui/server_status.py"
                 (("helpers.get_resource_path\\('images/server_stopped.png'\\)")
                  (string-append "'" onionshare "/images/server_stopped.png'"))
                 (("helpers.get_resource_path\\('images/server_working.png'\\)")
                  (string-append "'" onionshare "/images/server_working.png'"))
                 (("helpers.get_resource_path\\('images/server_started.png'\\)")
                  (string-append "'" onionshare "/images/server_started.png'")))
               (substitute*
                 "onionshare_gui/onionshare_gui.py"
                 (("helpers.get_resource_path\\('images/logo.png'\\)")
                  (string-append "'" onionshare "/images/logo.png'")))
               (substitute*
                 "install/onionshare.desktop"
                 (("/usr") out))
             #t)))
         (delete 'check)
         (add-before 'strip 'tests
           ;; After all the patching we run the tests after installing.
           ;; This is also a known issue:
           ;; https://github.com/micahflee/onionshare/issues/284
           (lambda _ (zero? (system* "nosetests" "test")))))
       ;; can't compress the egg because it expects to find all the resources
       ;; inside the egg as though it were a folder.
       #:configure-flags '("--single-version-externally-managed" "--root=/")
       ))
    (native-inputs
     `(("python-nose" ,python-nose)))
    (inputs
     `(("python-flask" ,python-flask)
       ("python-nautilus" ,python-nautilus)
       ("python-sip" ,python-sip)
       ("python-stem" ,python-stem)
       ("python-pyqt" ,python-pyqt)))
    (home-page "https://onionshare.org/")
    (synopsis "Securely and anonymously share files")
    (description "OnionShare lets you securely and anonymously share files of
any size.  It works by starting a web server, making it accessible as a Tor
hidden service, and generating an unguessable URL to access and download the
files.  It doesn't require setting up a server on the internet somewhere or
using a third party filesharing service.  You host the file on your own computer
and use a Tor hidden service to make it temporarily accessible over the
internet.  The other user just needs to use Tor Browser to download the file
from you.")
    (license (list license:gpl3+
                   license:bsd-3)))) ; onionshare/socks.py

(define-public python-nautilus
  (package
    (name "python-nautilus")
    (version "0.4.9")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "nautilus" version))
        (sha256
         (base32
          "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
    (build-system python-build-system)
    (arguments `(#:tests? #f)) ; fails to import test modules
    (native-inputs
     `(("python-setuptools" ,python-setuptools)))
    (inputs
     `(("python-bcrypt" ,python-bcrypt)
       ("python-click" ,python-click)
       ("python-consul" ,python-consul)
       ("python-graphql-core" ,python-graphql-core)
       ("python-graphql-relay" ,python-graphql-relay)
       ("python-graphene" ,python-graphene)
       ("python-jinja2" ,python-jinja2)
       ("python-nose2" ,python-nose2)
       ("python-peewee" ,python-peewee)
       ("python-pika" ,python-pika)
       ("python-pycparser" ,python-pycparser)
       ("python-requests" ,python-requests)
       ("python-tornado" ,python-tornado)
       ("python-wtforms" ,python-wtforms)))
    (home-page "https://github.com/AlecAivazis/nautilus")
    (synopsis "Library for creating microservice applications")
    (description
     "Nautilus is a framework for flux based microservices that looks to
provide extendible implementations of common aspects of a cloud so that you can
focus on building massively scalable web applications.")
    (license license:expat)))

(define-public python-bcrypt
  (package
    (name "python-bcrypt")
    (version "3.1.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "bcrypt" version))
        (sha256
         (base32
          "1giy0dvd8gvq6flxh44np1v2nqwsji5qsnrz038mgwzgp7c20j75"))))
        (build-system python-build-system)
    (native-inputs
     `(("python-pycparser" ,python-pycparser)
       ("python-pytest" ,python-pytest)))
    (inputs
     `(("python-cffi" ,python-cffi)
       ("python-six" ,python-six)))
    (home-page "https://github.com/pyca/bcrypt/")
    (synopsis
     "Modern password hashing library")
    (description
     "Bcrypt is a Python module which provides a password hashing method based
on the Blowfish password hashing algorithm, as described in
@url{http://static.usenix.org/events/usenix99/provos.html,\"A Future-Adaptable
Password Scheme\"} by Niels Provos and David Mazieres.")
    (license license:asl2.0)))

(define-public python2-bcrypt
  (let ((bcrypt (package-with-python2 python-bcrypt)))
    (package (inherit bcrypt)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs bcrypt))))))

(define-public python-nose2
  (package
    (name "python-nose2")
    (version "0.6.5")
      (source
        (origin
          (method url-fetch)
          (uri (pypi-uri "nose2" version))
          (sha256
           (base32
            "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
    (build-system python-build-system)
    (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
    (native-inputs
     `(("python-setuptools" ,python-setuptools)))
    (inputs
     `(("python-cov-core" ,python-cov-core)
       ("python-pytest-cov" ,python-pytest-cov)
       ("python-six" ,python-six)))
    (home-page "https://github.com/nose-devs/nose2")
    (synopsis "Next generation of nicer testing for Python")
    (description
     "Nose2 is the next generation of nicer testing for Python, based on the
plugins branch of unittest2.  Nose2 aims to improve on nose by providing a
better plugin api, being easier for users to configure, and simplifying internal
interfaces and processes.")
    (license license:bsd-2)))

(define-public python2-nose2
  (package-with-python2 python-nose2))

(define-public python-cov-core
  (package
    (name "python-cov-core")
    (version "1.15.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cov-core" version))
        (sha256
         (base32
    "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
    (build-system python-build-system)
    (native-inputs
     `(("python-coverage" ,python-coverage)))
    (home-page "https://github.com/schlamar/cov-core")
    (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
    (description
     "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
It is useful for developing coverage plugins for these testing frameworks.")
    (license license:expat)))

(define-public python2-cov-core
  (let ((cov-core (package-with-python2 python-cov-core)))
    (package (inherit cov-core)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs cov-core))))))

(define-public python-consul
  (package
    (name "python-consul")
    (version "0.6.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "python-consul" version))
        (sha256
         (base32
          "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
    (build-system python-build-system)
    (native-inputs
     `(("python-pytest" ,python-pytest)
       ("python-requests" ,python-requests)
       ("python-six" ,python-six)))
    (home-page "https://github.com/cablehead/python-consul")
    (synopsis "Python client for Consul")
    (description
     "Python client for @url{http://www.consul.io/,Consul}, a tool for service
discovery, monitoring and configuration.")
    (license license:expat)))

(define-public python2-consul
  (let ((consul (package-with-python2 python-consul)))
    (package (inherit consul)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs consul))))))

(define-public python-graphene
  (package
    (name "python-graphene")
    (version "0.10.2")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "graphene" version))
        (sha256
         (base32
          "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
    (build-system python-build-system)
    (native-inputs
     `(("python-django-filter" ,python-django-filter)
       ("python-mock" ,python-mock)
       ("python-psycopg2" ,python-psycopg2)
       ("python-pytest-django" ,python-pytest-django)
       ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
    (inputs
     `(("python-graphql-core" ,python-graphql-core)
       ("python-graphql-relay" ,python-graphql-relay)
       ("python-iso8601" ,python-iso8601)
       ("python-promise" ,python-promise)
       ("python-six" ,python-six)))
    (home-page "http://graphene-python.org/")
    (synopsis "GraphQL Framework for Python")
    (description
     "Graphene is a Python library for building GraphQL schemas/types.
A GraphQL schema describes your data model, and provides a GraphQL server
with an associated set of resolve methods that know how to fetch data.")
    (properties `((python2-variant . ,(delay python2-graphene))))
    (license license:expat)))

(define-public python2-graphene
  (let ((base (package-with-python2
                (strip-python2-variant python-graphene))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ("python2-sqlalchemy" ,python2-sqlalchemy)
         ,@(package-native-inputs base))))))

(define-public python-django-filter
  (package
    (name "python-django-filter")
    (version "0.14.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "django-filter" version))
        (sha256
         (base32
          "0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
    (build-system python-build-system)
    (home-page "https://django-filter.readthedocs.io/en/latest/")
    (synopsis "Reusable Django application to filter querysets dynamically")
    (description
     "Django-filter is a generic, reusable application to alleviate writing
some of the more mundane bits of view code.  Specifically, it allows users to
filter down a queryset based on a model’s fields, displaying the form to let
them do this.")
    (properties `((python2-variant . ,(delay python2-django-filter))))
    (license license:bsd-3)))

(define-public python2-django-filter
  (let ((base (package-with-python2
                (strip-python2-variant python-django-filter))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-pytest-django
  (package
    (name "python-pytest-django")
    (version "2.9.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-django" version))
        (sha256
         (base32
          "1mmc7zsz3dlhs6sx4sppkj1vgshabi362r1a8b8wpj1qfximpqcb"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-setuppy
           (lambda _
             (substitute* "setup.py"
                          (("setuptools_scm==1.8.0") "setuptools_scm"))
             #t)))))
    (native-inputs
     `(("python-setuptools-scm" ,python-setuptools-scm)))
    (inputs
     `(("python-py" ,python-py)
       ("python-pytest" ,python-pytest)))
    (home-page "http://pytest-django.readthedocs.org/")
    (synopsis "Django plugin for py.test")
    (description "Pytest-django is a plugin for py.test that provides a set of
useful tools for testing Django applications and projects.")
    (properties `((python2-variant . ,(delay python2-pytest-django))))
    (license license:bsd-3)))

(define-public python2-pytest-django
  (let ((base (package-with-python2
                (strip-python2-variant python-pytest-django))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-sqlalchemy-utils
  (package
    (name "python-sqlalchemy-utils")
    (version "0.32.9")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "SQLAlchemy-Utils" version))
        (sha256
         (base32
          "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
    (build-system python-build-system)
    (inputs
     `(("python-six" ,python-six)
       ("python-sqlalchemy" ,python-sqlalchemy)))
    (home-page "https://github.com/kvesteri/sqlalchemy-utils")
    (synopsis "Various utility functions for SQLAlchemy")
    (description
     "SQLAlchemy-utils provides various utility functions and custom data types
for SQLAlchemy.  SQLAlchemy is an SQL database abstraction library for Python.")
    (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
    (license license:bsd-3)))

(define-public python2-sqlalchemy-utils
  (let ((base (package-with-python2
                (strip-python2-variant python-sqlalchemy-utils))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-graphql-relay
  (package
    (name "python-graphql-relay")
    (version "0.4.4")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "graphql-relay" version))
        (sha256
         (base32
          "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
    (build-system python-build-system)
    (native-inputs
     `(("python-pytest" ,python-pytest)))
    (inputs
     `(("python-graphql-core" ,python-graphql-core)
       ("python-promise" ,python-promise)
       ("python-six" ,python-six)))
    (home-page "https://github.com/graphql-python/graphql-relay-py")
    (synopsis "Relay implementation for Python")
    (description
     "This is a library to allow the easy creation of Relay-compliant servers
using the GraphQL Python reference implementation of a GraphQL server.  It
should be noted that the code is a exact port of the original
@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
from Facebook.")
    (properties `((python2-variant . ,(delay python2-graphql-relay))))
    (license license:expat)))

(define-public python2-graphql-relay
  (let ((base (package-with-python2
                (strip-python2-variant python-graphql-relay))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-graphql-core
  (package
    (name "python-graphql-core")
    (version "0.5.3")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "graphql-core" version))
        (sha256
         (base32
          "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-hardcoded-version
           (lambda _ (substitute*
                       "setup.py"
                       (("'gevent==1.1rc1'") "'gevent'"))
             #t)))))
    (native-inputs
     `(("python-gevent" ,python-gevent)
       ("python-mock" ,python-mock)
       ("python-pytest-mock" ,python-pytest-mock)))
    (inputs
     `(("python-promise" ,python-promise)
       ("python-six" ,python-six)))
    (home-page "https://github.com/graphql-python/graphql-core")
    (synopsis "GraphQL implementation for Python")
    (description
     "GraphQL implementation for Python.  GraphQL is a data query language and
runtime designed and used to request and deliver data to mobile and web apps.
This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
to Python.")
    (properties `((python2-variant . ,(delay python2-graphql-core))))
    (license license:expat)))

(define-public python2-graphql-core
  (let ((base (package-with-python2
                (strip-python2-variant python-graphql-core))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base))))))

(define-public python-pytest-mock
  (package
    (name "python-pytest-mock")
    (version "1.2")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-mock" version ".zip"))
        (sha256
         (base32
          "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
    (build-system python-build-system)
    (native-inputs
     `(("unzip" ,unzip)))
    (inputs
     `(("python-py" ,python-py)
       ("python-pytest" ,python-pytest)))
    (home-page "https://github.com/pytest-dev/pytest-mock/")
    (synopsis "Thin-wrapper around the mock package for easier use with py.test")
    (description
     "This plugin installs a @code{mocker} fixture which is a thin-wrapper
around the patching API provided by the @code{mock} package, but with the
benefit of not having to worry about undoing patches at the end of a test.
The mocker fixture has the same API as @code{mock.patch}, supporting the
same arguments.")
    (properties `((python2-variant . ,(delay python2-pytest-mock))))
    (license license:expat)))

(define-public python2-pytest-mock
  (let ((base (package-with-python2
                (strip-python2-variant python-pytest-mock))))
    (package (inherit base)
      (native-inputs
       `(("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs base)))
      (inputs
       `(("python2-mock" ,python2-mock)
         ,@(package-inputs base))))))

(define-public python-promise
  (package
    (name "python-promise")
    (version "0.4.2")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "promise" version))
        (sha256
         (base32
          "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
    (build-system python-build-system)
    ;; Tests wants python-futures, which is a python2 only program, and
    ;; can't be found by python2-promise at test time.
    (arguments `(#:tests? #f))
    (home-page "https://github.com/syrusakbary/promise")
    (synopsis "Promises/A+ implementation for Python")
    (description
     "Promises/A+ implementation for Python")
    (properties `((python2-variant . ,(delay python2-promise))))
    (license license:expat)))

(define-public python2-promise
  (let ((promise (package-with-python2
                   (strip-python2-variant python-promise))))
    (package (inherit promise)
      (arguments (substitute-keyword-arguments (package-arguments promise)
                   ((#:tests? _) #t)))
      (native-inputs
       `(("python2-futures" ,python2-futures)
         ("python2-pytest" ,python2-pytest)
         ("python2-setuptools" ,python2-setuptools)
         ,@(package-native-inputs promise))))))

(define-public python-peewee
  (package
    (name "python-peewee")
    (version "2.8.3")
      (source
        (origin
        (method url-fetch)
        (uri (pypi-uri "peewee" version))
        (sha256
         (base32
          "1605bk11s7aap2q4qyba93rx7yfh8b11kk0cqi08z8klx2iar8yd"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f)) ; Fails to import test data
    (native-inputs
     `(("python-cython" ,python-cython)))
    (home-page "https://github.com/coleifer/peewee/")
    (synopsis "Small object-relational mapping utility")
    (description
     "Peewee is a simple and small ORM (object-relation mapping) tool.  Peewee
handles converting between pythonic values and those used by databases, so you
can use Python types in your code without having to worry.  It has built-in
support for sqlite, mysql and postgresql.  If you already have a database, you
can autogenerate peewee models using @code{pwiz}, a model generator.")
    (license license:expat)))

(define-public python2-peewee
  (package-with-python2 python-peewee))

(define-public python-pika
  (package
    (name "python-pika")
    (version "0.10.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pika" version))
        (sha256
         (base32
          "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
    (build-system python-build-system)
    (native-inputs
     `(("python-twisted" ,python-twisted)))
    (home-page "https://pika.readthedocs.org")
    (synopsis "Pure Python AMQP Client Library")
    (description
     "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
network support library.")
    (license license:bsd-3)))

(define-public python2-pika
  (package-with-python2 python-pika))

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

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

* Re: [PATCH 01/16] gnu: Add python-pika.
  2016-09-11 18:58 ` [PATCH 01/16] gnu: Add python-pika Efraim Flashner
@ 2016-09-11 19:36   ` David Craven
  2016-09-11 19:37     ` David Craven
  0 siblings, 1 reply; 28+ messages in thread
From: David Craven @ 2016-09-11 19:36 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Indentation:
+    (source
+      (origin

should be (source (origin

+    (home-page "https://pika.readthedocs.org")
+    (synopsis "Pure Python AMQP Client Library")
+    (description
+     "Pika is a pure-Python implementation of the AMQP (Advanced
Message Queuing
+Protocol) 0-9-1 protocol that tries to stay fairly independent of the
underlying
+network support library.")

should be (description "Pika ...

nitpick: move home-page between description and license

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

* Re: [PATCH 01/16] gnu: Add python-pika.
  2016-09-11 19:36   ` David Craven
@ 2016-09-11 19:37     ` David Craven
  2016-09-12  5:33       ` Efraim Flashner
  0 siblings, 1 reply; 28+ messages in thread
From: David Craven @ 2016-09-11 19:37 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

the properties delay thing is missing, dunno if it's important

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

* Re: [PATCH 06/16] gnu: Add python-graphql-relay.
  2016-09-11 18:58 ` [PATCH 06/16] gnu: Add python-graphql-relay Efraim Flashner
@ 2016-09-11 19:38   ` David Craven
  0 siblings, 0 replies; 28+ messages in thread
From: David Craven @ 2016-09-11 19:38 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Same issues as in previous email. LGTM otherwise.

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

* Re: [PATCH 13/16] gnu: Add python-nose2.
  2016-09-11 18:58 ` [PATCH 13/16] gnu: Add python-nose2 Efraim Flashner
@ 2016-09-11 19:39   ` David Craven
  0 siblings, 0 replies; 28+ messages in thread
From: David Craven @ 2016-09-11 19:39 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

> +    (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
> +    (native-inputs
> +     `(("python-setuptools" ,python-setuptools)))
> +    (inputs
> +     `(("python-cov-core" ,python-cov-core)
> +       ("python-pytest-cov" ,python-pytest-cov)
> +       ("python-six" ,python-six)))

nitpick: arguments below inputs.

same as with other patch otherwise LGTM

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

* Re: [PATCH 03/16] gnu: Add python-promise.
  2016-09-11 18:58 ` [PATCH 03/16] gnu: Add python-promise Efraim Flashner
@ 2016-09-11 19:41   ` David Craven
  2016-09-12  5:31     ` Efraim Flashner
  0 siblings, 1 reply; 28+ messages in thread
From: David Craven @ 2016-09-11 19:41 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

> +(define-public python2-promise
> +  (let ((promise (package-with-python2
> +                   (strip-python2-variant python-promise))))
> +    (package (inherit promise)
> +      (arguments (substitute-keyword-arguments (package-arguments promise)
> +                   ((#:tests? _) #t)))

I've seen this in a few of your patches. Why do tests fail with python
but not with python-2?

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

* Re: [PATCH 04/16] gnu: Add python-pytest-mock.
  2016-09-11 18:58 ` [PATCH 04/16] gnu: Add python-pytest-mock Efraim Flashner
@ 2016-09-11 19:42   ` David Craven
  2016-09-12  5:34     ` Efraim Flashner
  0 siblings, 1 reply; 28+ messages in thread
From: David Craven @ 2016-09-11 19:42 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

> +      (inputs
> +       `(("python2-mock" ,python2-mock)
> +         ,@(package-inputs base))))))

Is python2-mock really an input and not a native-input?

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

* Re: [PATCH 03/16] gnu: Add python-promise.
  2016-09-11 19:41   ` David Craven
@ 2016-09-12  5:31     ` Efraim Flashner
  0 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-12  5:31 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

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

On Sun, Sep 11, 2016 at 09:41:10PM +0200, David Craven wrote:
> > +(define-public python2-promise
> > +  (let ((promise (package-with-python2
> > +                   (strip-python2-variant python-promise))))
> > +    (package (inherit promise)
> > +      (arguments (substitute-keyword-arguments (package-arguments promise)
> > +                   ((#:tests? _) #t)))
> 
> I've seen this in a few of your patches. Why do tests fail with python
> but not with python-2?

In this one the tests require python-futures, which is python2 only. I
tried adding python2-futures anyway to the native-inputs but
unsuprisingly it didn't help with the tests. The right fix is to have
upstream change it so that it says (something like)

tests:
  require:
    "pytest" ,(version < '3' "futures");

but I need to read up more on my python syntax to suggest a patch.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* Re: [PATCH 01/16] gnu: Add python-pika.
  2016-09-11 19:37     ` David Craven
@ 2016-09-12  5:33       ` Efraim Flashner
  2016-09-12 11:56         ` The ‘python2-variant’ property Ludovic Courtès
  0 siblings, 1 reply; 28+ messages in thread
From: Efraim Flashner @ 2016-09-12  5:33 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

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

On Sun, Sep 11, 2016 at 09:37:31PM +0200, David Craven wrote:
> the properties delay thing is missing, dunno if it's important

the properties delay is needed when the python2 variant includes the
strip-python2-variant procedure, following which just about every
package that relies on it also needs it, going up the chain.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* Re: [PATCH 04/16] gnu: Add python-pytest-mock.
  2016-09-11 19:42   ` David Craven
@ 2016-09-12  5:34     ` Efraim Flashner
  0 siblings, 0 replies; 28+ messages in thread
From: Efraim Flashner @ 2016-09-12  5:34 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

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

On Sun, Sep 11, 2016 at 09:42:34PM +0200, David Craven wrote:
> > +      (inputs
> > +       `(("python2-mock" ,python2-mock)
> > +         ,@(package-inputs base))))))
> 
> Is python2-mock really an input and not a native-input?

Actually, yes. I was a little suprised that the python3 version didn't
want it also. Since its one of the python test packages it actually
retains references to the other test packages.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* The ‘python2-variant’ property
  2016-09-12  5:33       ` Efraim Flashner
@ 2016-09-12 11:56         ` Ludovic Courtès
  0 siblings, 0 replies; 28+ messages in thread
From: Ludovic Courtès @ 2016-09-12 11:56 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Sun, Sep 11, 2016 at 09:37:31PM +0200, David Craven wrote:
>> the properties delay thing is missing, dunno if it's important
>
> the properties delay is needed when the python2 variant

More generally, it is needed whenever the python2 variant of the
package is more than just a translation of the python3 variant.

For instance, compared to python-lockfile, python2-lockfile has an
additional dependency on python2-setuptools.  The ‘python2-variant’
property allows us explicitly state the relationship between these two
packages.

HTH,
Ludo’.

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

end of thread, other threads:[~2016-09-12 11:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-11 18:58 [PATCH 00/16] Add onionshare Efraim Flashner
2016-09-11 18:58 ` [PATCH 01/16] gnu: Add python-pika Efraim Flashner
2016-09-11 19:36   ` David Craven
2016-09-11 19:37     ` David Craven
2016-09-12  5:33       ` Efraim Flashner
2016-09-12 11:56         ` The ‘python2-variant’ property Ludovic Courtès
2016-09-11 18:58 ` [PATCH 02/16] gnu: Add python-peewee Efraim Flashner
2016-09-11 18:58 ` [PATCH 03/16] gnu: Add python-promise Efraim Flashner
2016-09-11 19:41   ` David Craven
2016-09-12  5:31     ` Efraim Flashner
2016-09-11 18:58 ` [PATCH 04/16] gnu: Add python-pytest-mock Efraim Flashner
2016-09-11 19:42   ` David Craven
2016-09-12  5:34     ` Efraim Flashner
2016-09-11 18:58 ` [PATCH 05/16] gnu: Add python-graphql-core Efraim Flashner
2016-09-11 18:58 ` [PATCH 06/16] gnu: Add python-graphql-relay Efraim Flashner
2016-09-11 19:38   ` David Craven
2016-09-11 18:58 ` [PATCH 07/16] gnu: Add python-sqlalchemy-utils Efraim Flashner
2016-09-11 18:58 ` [PATCH 08/16] gnu: Add python-pytest-django Efraim Flashner
2016-09-11 18:58 ` [PATCH 09/16] gnu: Add python-django-filter Efraim Flashner
2016-09-11 18:58 ` [PATCH 10/16] gnu: Add python-graphene Efraim Flashner
2016-09-11 18:58 ` [PATCH 11/16] gnu: Add python-consul Efraim Flashner
2016-09-11 18:58 ` [PATCH 12/16] gnu: Add python-cov-core Efraim Flashner
2016-09-11 18:58 ` [PATCH 13/16] gnu: Add python-nose2 Efraim Flashner
2016-09-11 19:39   ` David Craven
2016-09-11 18:58 ` [PATCH 14/16] gnu: Add python-bcrypt Efraim Flashner
2016-09-11 18:58 ` [PATCH 15/16] gnu: Add python-nautilus Efraim Flashner
2016-09-11 18:58 ` [PATCH 16/16] gnu: Add onionshare Efraim Flashner
2016-09-11 19:00 ` [PATCH 00/16] " Efraim Flashner

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.