unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages
@ 2017-10-06 20:20 Christopher Baines
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-06 20:20 UTC (permalink / raw)
  To: 28726

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

I tried to update python-sqlparse, but it turns out that quite a few of
the dependant packages were broken already.

I've managed to fix all but one of them. The python-django-mailman3
package still fails to build, I think because it (or at least the
testsuite) is not compatible with python 3.

Christopher Baines (5):
  gnu: django: Fix the build for python-django-gravatar2.
  gnu: django: Fix building python-django-allauth.
  gnu: django: Fix building python2-django-mailman3.
  gnu: python: Disable tests for python-graphene.
  gnu: python: Update python-sqlparse.

 gnu/packages/django.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++---
 gnu/packages/mail.scm   | 11 ++++++++++
 gnu/packages/python.scm |  7 +++++--
 3 files changed, 67 insertions(+), 5 deletions(-)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

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

* [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
  2017-10-06 20:20 [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
@ 2017-10-06 20:26 ` Christopher Baines
  2017-10-06 20:26   ` [bug#28726] [PATCH 2/5] gnu: django: Fix building python-django-allauth Christopher Baines
                     ` (4 more replies)
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
  2017-11-24 22:23 ` bug#28726: [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
  2 siblings, 5 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-06 20:26 UTC (permalink / raw)
  To: 28726

The build was failing as the Django settings were not configured for the
tests. The relevant files are missing from the release on PyPI, so switch to
using a more complete source release. Also update the package at the same
time.

* gnu/packages/django.scm (python-django-gravatar2)[version]: 1.4.0 -> 1.4.2.
  [source]: Change to use a tarball from GitHub, update the sha256 hash.
  [arguments]: Add a phase to skip a test requiring network access, and
  replace the check phase to call ./manage.py within the example_project
  directory.
---
 gnu/packages/django.scm | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index c70c07493..fb8663d3f 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -226,15 +226,43 @@ account authentication.")
 (define-public python-django-gravatar2
   (package
     (name "python-django-gravatar2")
-    (version "1.4.0")
+    (version "1.4.2")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "django-gravatar2" version))
+       (uri (string-append
+             "https://github.com/twaddington/django-gravatar/archive/"
+             version ".tar.gz"))
        (sha256
         (base32
-         "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
+         "1qa0awqkfnfcjx7d5ijgr9hj8ifpq5xrj16196im4hw9r9i1wapf"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "django_gravatar/tests.py"
+               (("def test_has_gravatar")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_has_gravatar"))))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd)
+                      ":"
+                      (getenv "PYTHONPATH")))
+             (with-directory-excursion "example_project"
+               (zero?
+                (system*
+                 "./manage.py"
+                 "test"
+                 "--verbosity=2"
+                 "--exclude-tag=requires-web"
+                 "django_gravatar"))))))))
     (inputs
      `(("python-django" ,python-django)))
     (home-page "https://github.com/twaddington/django-gravatar")
-- 
2.14.2

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

* [bug#28726] [PATCH 2/5] gnu: django: Fix building python-django-allauth.
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
@ 2017-10-06 20:26   ` Christopher Baines
  2017-10-06 20:27   ` [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3 Christopher Baines
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-06 20:26 UTC (permalink / raw)
  To: 28726

* gnu/packages/django.scm (python-django-allauth)[arguments]: Modify the
  standard phases to skip a test, and run the tests using django-admin with
  the settings configured.
---
 gnu/packages/django.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index fb8663d3f..93068300d 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -204,6 +204,26 @@ them do this.")
         (base32
          "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "allauth/socialaccount/providers/openid/tests.py"
+               (("def test_login")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_login"))))
+         (replace 'check
+           (lambda _
+             (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
+             (zero? (system*
+                     "django-admin"
+                     "test"
+                     "allauth"
+                     "--verbosity=2"
+                     "--exclude-tag=requires-web")))))))
     (propagated-inputs
      `(("python-openid" ,python-openid)
        ("python-requests" ,python-requests)
-- 
2.14.2

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

* [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
  2017-10-06 20:26   ` [bug#28726] [PATCH 2/5] gnu: django: Fix building python-django-allauth Christopher Baines
@ 2017-10-06 20:27   ` Christopher Baines
  2017-10-08  3:42     ` Cyril Roelandt
  2017-10-06 20:27   ` [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene Christopher Baines
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Christopher Baines @ 2017-10-06 20:27 UTC (permalink / raw)
  To: 28726

The python-django-mailman3 build is still broken, as I don't think this
package is compatible with python3 yet. With this patch, the tests fail due to
the lack of urllib2 (which is just urllib in python3).

* gnu/packages/django.scm (python-django-mailman3)[arguments]: Modify the
  phases to run the tests using django-admin.
---
 gnu/packages/mail.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index cc3977e2c..62bcfef1a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2091,6 +2091,17 @@ installation on systems where resources are limited.  Its features include:
         (base32
          "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero?
+              (system*
+               "django-admin"
+               "test"
+               "--settings=django_mailman3.tests.settings_test"
+               "django_mailman3")))))))
     (inputs
      `(("python-django" ,python-django)))
     (propagated-inputs
-- 
2.14.2

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

* [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene.
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
  2017-10-06 20:26   ` [bug#28726] [PATCH 2/5] gnu: django: Fix building python-django-allauth Christopher Baines
  2017-10-06 20:27   ` [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3 Christopher Baines
@ 2017-10-06 20:27   ` Christopher Baines
  2017-10-08  3:32     ` Cyril Roelandt
  2017-10-06 20:27   ` [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse Christopher Baines
  2017-10-08  3:30   ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Cyril Roelandt
  4 siblings, 1 reply; 22+ messages in thread
From: Christopher Baines @ 2017-10-06 20:27 UTC (permalink / raw)
  To: 28726

As the tests are missing from the PyPI release.

* gnu/packages/python.scm (python-graphene)[arguments]: Set #:tests? to #f.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 594dd38e4..6489bb415 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13099,6 +13099,9 @@ from Facebook.")
          (base32
           "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
     (build-system python-build-system)
+    (arguments
+     ;; Tests missing from PyPI release.
+     '(#:tests? #f))
     (native-inputs
      `(("python-django-filter" ,python-django-filter)
        ("python-mock" ,python-mock)
-- 
2.14.2

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

* [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse.
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
                     ` (2 preceding siblings ...)
  2017-10-06 20:27   ` [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene Christopher Baines
@ 2017-10-06 20:27   ` Christopher Baines
  2017-10-08  3:39     ` Cyril Roelandt
  2017-10-08  3:30   ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Cyril Roelandt
  4 siblings, 1 reply; 22+ messages in thread
From: Christopher Baines @ 2017-10-06 20:27 UTC (permalink / raw)
  To: 28726

* gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
  [source]: Update the sha256 hash.
---
 gnu/packages/python.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6489bb415..8362696e9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11548,13 +11548,13 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
 (define-public python-sqlparse
   (package
     (name "python-sqlparse")
-    (version "0.1.19")
+    (version "0.2.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "sqlparse" version))
               (sha256
                (base32
-                "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
+                "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
-- 
2.14.2

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

* [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
                     ` (3 preceding siblings ...)
  2017-10-06 20:27   ` [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse Christopher Baines
@ 2017-10-08  3:30   ` Cyril Roelandt
  2017-10-08 14:52     ` Christopher Baines
  4 siblings, 1 reply; 22+ messages in thread
From: Cyril Roelandt @ 2017-10-08  3:30 UTC (permalink / raw)
  To: 28726

On 10/06/2017 10:26 PM, Christopher Baines wrote:
> The build was failing as the Django settings were not configured for the
> tests. The relevant files are missing from the release on PyPI, so switch to
> using a more complete source release. Also update the package at the same
> time.
What are these missing files? Couldn't we add them using a patch? Is
there a reason why they were not included in PyPI, or is this a bug?

The reason why we'd like to use PyPI rather than other URLs is that,
when using PyPI, "guix refresh" is able to find new releases automatically.


Cyril.

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

* [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene.
  2017-10-06 20:27   ` [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene Christopher Baines
@ 2017-10-08  3:32     ` Cyril Roelandt
  2017-10-08  7:55       ` ng0
  0 siblings, 1 reply; 22+ messages in thread
From: Cyril Roelandt @ 2017-10-08  3:32 UTC (permalink / raw)
  To: 28726

On 10/06/2017 10:27 PM, Christopher Baines wrote:
> As the tests are missing from the PyPI release.

Looks good to me.

This is done on purpose:
https://github.com/graphql-python/graphene/blob/master/MANIFEST.in . Do
you think the authors would be open to fix this?


Cyril.

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

* [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse.
  2017-10-06 20:27   ` [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse Christopher Baines
@ 2017-10-08  3:39     ` Cyril Roelandt
  0 siblings, 0 replies; 22+ messages in thread
From: Cyril Roelandt @ 2017-10-08  3:39 UTC (permalink / raw)
  To: 28726

On 10/06/2017 10:27 PM, Christopher Baines wrote:
> * gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
>   [source]: Update the sha256 hash.
OK, thanks!


Cyril.

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

* [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
  2017-10-06 20:27   ` [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3 Christopher Baines
@ 2017-10-08  3:42     ` Cyril Roelandt
  2017-10-08  7:53       ` ng0
  0 siblings, 1 reply; 22+ messages in thread
From: Cyril Roelandt @ 2017-10-08  3:42 UTC (permalink / raw)
  To: 28726

On 10/06/2017 10:27 PM, Christopher Baines wrote:
> The python-django-mailman3 build is still broken, as I don't think this
> package is compatible with python3 yet. With this patch, the tests fail due to
> the lack of urllib2 (which is just urllib in python3).

You're right: https://gitlab.com/mailman/django-mailman3/issues/3 .


Shouldn't this package be removed? I believe we should only keep the
Python 2 version. WDYT?

Cyril.

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

* [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
  2017-10-08  3:42     ` Cyril Roelandt
@ 2017-10-08  7:53       ` ng0
  2017-10-08 16:04         ` Christopher Baines
  0 siblings, 1 reply; 22+ messages in thread
From: ng0 @ 2017-10-08  7:53 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28726

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

Cyril Roelandt transcribed 0.4K bytes:
> On 10/06/2017 10:27 PM, Christopher Baines wrote:
> > The python-django-mailman3 build is still broken, as I don't think this
> > package is compatible with python3 yet. With this patch, the tests fail due to
> > the lack of urllib2 (which is just urllib in python3).
> 
> You're right: https://gitlab.com/mailman/django-mailman3/issues/3 .
> 
> 
> Shouldn't this package be removed? I believe we should only keep the
> Python 2 version. WDYT?
> 
> Cyril.

As far as I understood Harmut and Mailman back then, only some parts
of mailman3 are python3 compatible (search the mailinglist for it).
I seem to be remember that it was limited to frontends so far, so
you are right it should be removed.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://krosos.org

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

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

* [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene.
  2017-10-08  3:32     ` Cyril Roelandt
@ 2017-10-08  7:55       ` ng0
  0 siblings, 0 replies; 22+ messages in thread
From: ng0 @ 2017-10-08  7:55 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28726

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

Cyril Roelandt transcribed 0.3K bytes:
> On 10/06/2017 10:27 PM, Christopher Baines wrote:
> > As the tests are missing from the PyPI release.
> 
> Looks good to me.
> 
> This is done on purpose:
> https://github.com/graphql-python/graphene/blob/master/MANIFEST.in . Do
> you think the authors would be open to fix this?
> 
> 
> Cyril.

As I would say: "Don't ask to ask, just ask".
Even when it might take a very long time, you'll get a response
from upstream developers.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://krosos.org

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

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

* [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
  2017-10-08  3:30   ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Cyril Roelandt
@ 2017-10-08 14:52     ` Christopher Baines
  2017-10-08 16:02       ` Christopher Baines
  0 siblings, 1 reply; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 14:52 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28726

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

On Sun, 8 Oct 2017 05:30:56 +0200
Cyril Roelandt <tipecaml@gmail.com> wrote:

> On 10/06/2017 10:26 PM, Christopher Baines wrote:
> > The build was failing as the Django settings were not configured
> > for the tests. The relevant files are missing from the release on
> > PyPI, so switch to using a more complete source release. Also
> > update the package at the same time.  
> What are these missing files? Couldn't we add them using a patch? Is
> there a reason why they were not included in PyPI, or is this a bug?

It's the example_project/settings.py file that is key. I guess this
could be added as a patch, it's a little long at 168 lines though.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

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

* [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
  2017-10-08 14:52     ` Christopher Baines
@ 2017-10-08 16:02       ` Christopher Baines
  0 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:02 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: 28726

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

On Sun, 8 Oct 2017 15:52:45 +0100
Christopher Baines <mail@cbaines.net> wrote:

> On Sun, 8 Oct 2017 05:30:56 +0200
> Cyril Roelandt <tipecaml@gmail.com> wrote:
> 
> > On 10/06/2017 10:26 PM, Christopher Baines wrote:  
> > > The build was failing as the Django settings were not configured
> > > for the tests. The relevant files are missing from the release on
> > > PyPI, so switch to using a more complete source release. Also
> > > update the package at the same time.    
> > What are these missing files? Couldn't we add them using a patch? Is
> > there a reason why they were not included in PyPI, or is this a
> > bug?  
> 
> It's the example_project/settings.py file that is key. I guess this
> could be added as a patch, it's a little long at 168 lines though.

On a more practical note, I don't know of an proper way of generating
such a patch. The only approaches that come to mind are going through
Git, or writing it manually in Emacs, both of which seem bad. Any
advice on generating patches?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

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

* [bug#28726] [PATCH 1/6] gnu: django: Fix the build for python-django-gravatar2.
  2017-10-06 20:20 [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
@ 2017-10-08 16:03 ` Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 2/6] gnu: django: Fix building python-django-allauth Christopher Baines
                     ` (4 more replies)
  2017-11-24 22:23 ` bug#28726: [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
  2 siblings, 5 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:03 UTC (permalink / raw)
  To: 28726

The build was failing as the Django settings were not configured for the
tests. The relevant files are missing from the release on PyPI, so switch to
using a more complete source release. Also update the package at the same
time.

* gnu/packages/django.scm (python-django-gravatar2)[version]: 1.4.0 -> 1.4.2.
  [source]: Change to use a tarball from GitHub, update the sha256 hash.
  [arguments]: Add a phase to skip a test requiring network access, and
  replace the check phase to call ./manage.py within the example_project
  directory.
---
 gnu/packages/django.scm | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index c70c07493..fb8663d3f 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -226,15 +226,43 @@ account authentication.")
 (define-public python-django-gravatar2
   (package
     (name "python-django-gravatar2")
-    (version "1.4.0")
+    (version "1.4.2")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "django-gravatar2" version))
+       (uri (string-append
+             "https://github.com/twaddington/django-gravatar/archive/"
+             version ".tar.gz"))
        (sha256
         (base32
-         "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
+         "1qa0awqkfnfcjx7d5ijgr9hj8ifpq5xrj16196im4hw9r9i1wapf"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "django_gravatar/tests.py"
+               (("def test_has_gravatar")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_has_gravatar"))))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd)
+                      ":"
+                      (getenv "PYTHONPATH")))
+             (with-directory-excursion "example_project"
+               (zero?
+                (system*
+                 "./manage.py"
+                 "test"
+                 "--verbosity=2"
+                 "--exclude-tag=requires-web"
+                 "django_gravatar"))))))))
     (inputs
      `(("python-django" ,python-django)))
     (home-page "https://github.com/twaddington/django-gravatar")
-- 
2.14.2

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

* [bug#28726] [PATCH 2/6] gnu: django: Fix building python-django-allauth.
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
@ 2017-10-08 16:03   ` Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 3/6] gnu: mail: Fix building python2-django-mailman3 Christopher Baines
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:03 UTC (permalink / raw)
  To: 28726

* gnu/packages/django.scm (python-django-allauth)[arguments]: Modify the
  standard phases to skip a test, and run the tests using django-admin with
  the settings configured.
---
 gnu/packages/django.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index fb8663d3f..93068300d 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -204,6 +204,26 @@ them do this.")
         (base32
          "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; TODO: Tagging the tests requiring the web could be done upstream.
+         (add-before 'check 'skip-test-requiring-network-access
+           (lambda _
+             (substitute* "allauth/socialaccount/providers/openid/tests.py"
+               (("def test_login")
+                "from django.test import tag
+    @tag('requires-web')
+    def test_login"))))
+         (replace 'check
+           (lambda _
+             (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
+             (zero? (system*
+                     "django-admin"
+                     "test"
+                     "allauth"
+                     "--verbosity=2"
+                     "--exclude-tag=requires-web")))))))
     (propagated-inputs
      `(("python-openid" ,python-openid)
        ("python-requests" ,python-requests)
-- 
2.14.2

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

* [bug#28726] [PATCH 3/6] gnu: mail: Fix building python2-django-mailman3.
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 2/6] gnu: django: Fix building python-django-allauth Christopher Baines
@ 2017-10-08 16:03   ` Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 4/6] gnu: python: Disable tests for python-graphene Christopher Baines
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:03 UTC (permalink / raw)
  To: 28726

The python-django-mailman3 build is still broken, as I don't think this
package is compatible with python3 yet. With this patch, the tests fail due to
the lack of urllib2 (which is just urllib in python3).

* gnu/packages/mail.scm (python-django-mailman3)[arguments]: Modify the phases
  to run the tests using django-admin.
---
 gnu/packages/mail.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ddf583649..4d0e177e5 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2091,6 +2091,17 @@ installation on systems where resources are limited.  Its features include:
         (base32
          "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero?
+              (system*
+               "django-admin"
+               "test"
+               "--settings=django_mailman3.tests.settings_test"
+               "django_mailman3")))))))
     (inputs
      `(("python-django" ,python-django)))
     (propagated-inputs
-- 
2.14.2

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

* [bug#28726] [PATCH 4/6] gnu: python: Disable tests for python-graphene.
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 2/6] gnu: django: Fix building python-django-allauth Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 3/6] gnu: mail: Fix building python2-django-mailman3 Christopher Baines
@ 2017-10-08 16:03   ` Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 5/6] gnu: python: Update python-sqlparse Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 6/6] gnu: mail: Remove python-django-mailman3 Christopher Baines
  4 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:03 UTC (permalink / raw)
  To: 28726

As the tests are missing from the PyPI release.

* gnu/packages/python.scm (python-graphene)[arguments]: Set #:tests? to #f.
---
 gnu/packages/python.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index cc7aa8fa4..eb98f5f13 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13112,6 +13112,9 @@ from Facebook.")
          (base32
           "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
     (build-system python-build-system)
+    (arguments
+     ;; Tests missing from PyPI release.
+     '(#:tests? #f))
     (native-inputs
      `(("python-django-filter" ,python-django-filter)
        ("python-mock" ,python-mock)
-- 
2.14.2

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

* [bug#28726] [PATCH 5/6] gnu: python: Update python-sqlparse.
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
                     ` (2 preceding siblings ...)
  2017-10-08 16:03   ` [bug#28726] [PATCH 4/6] gnu: python: Disable tests for python-graphene Christopher Baines
@ 2017-10-08 16:03   ` Christopher Baines
  2017-10-08 16:03   ` [bug#28726] [PATCH 6/6] gnu: mail: Remove python-django-mailman3 Christopher Baines
  4 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:03 UTC (permalink / raw)
  To: 28726

* gnu/packages/python.scm (python-sqlparse)[version]: 0.1.19 -> 0.2.4.
  [source]: Update the sha256 hash.
---
 gnu/packages/python.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index eb98f5f13..8b2ed6612 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11561,13 +11561,13 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
 (define-public python-sqlparse
   (package
     (name "python-sqlparse")
-    (version "0.1.19")
+    (version "0.2.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "sqlparse" version))
               (sha256
                (base32
-                "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
+                "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
-- 
2.14.2

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

* [bug#28726] [PATCH 6/6] gnu: mail: Remove python-django-mailman3.
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
                     ` (3 preceding siblings ...)
  2017-10-08 16:03   ` [bug#28726] [PATCH 5/6] gnu: python: Update python-sqlparse Christopher Baines
@ 2017-10-08 16:03   ` Christopher Baines
  4 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:03 UTC (permalink / raw)
  To: 28726

This package fails to build, as django-mailman3 currently only works with
Python 2.

* gnu/packages/mail.scm (python-django-mailman3): Removed variable.
  (python2-django-mailman3): Inline the use of python-django-mailman3, and
  remove the use of package-with-python2.
---
 gnu/packages/mail.scm | 34 +++++++++++++---------------------
 1 file changed, 13 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 4d0e177e5..dfa78da26 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2079,9 +2079,9 @@ installation on systems where resources are limited.  Its features include:
 @end enumerate\n")
     (license license:expat)))
 
-(define-public python-django-mailman3
+(define-public python2-django-mailman3
   (package
-    (name "python-django-mailman3")
+    (name "python2-django-mailman3")
     (version "1.0.1")
     (source
      (origin
@@ -2092,7 +2092,7 @@ installation on systems where resources are limited.  Its features include:
          "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
     (build-system python-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (replace 'check
            (lambda _
@@ -2101,17 +2101,18 @@ installation on systems where resources are limited.  Its features include:
                "django-admin"
                "test"
                "--settings=django_mailman3.tests.settings_test"
-               "django_mailman3")))))))
+               "django_mailman3")))))
+       #:python ,python-2))
     (inputs
-     `(("python-django" ,python-django)))
+     `(("python2-django" ,python2-django)))
     (propagated-inputs
-     `(("python-requests" ,python-requests)
-       ("python-requests-oauthlib" ,python-requests-oauthlib)
-       ("python-openid" ,python-openid)
-       ("python-mailmanclient" ,python-mailmanclient)
-       ("python-django-allauth" ,python-django-allauth)
-       ("python-django-gravatar2" ,python-django-gravatar2)
-       ("python-pytz" ,python-pytz)))
+     `(("python2-requests" ,python2-requests)
+       ("python2-requests-oauthlib" ,python2-requests-oauthlib)
+       ("python2-openid" ,python2-openid)
+       ("python2-mailmanclient" ,python2-mailmanclient)
+       ("python2-django-allauth" ,python2-django-allauth)
+       ("python2-django-gravatar2" ,python2-django-gravatar2)
+       ("python2-pytz" ,python2-pytz)))
     (home-page "https://gitlab.com/mailman/django-mailman3")
     (synopsis "Django library for Mailman UIs")
     (description
@@ -2119,15 +2120,6 @@ installation on systems where resources are limited.  Its features include:
 interacting with Mailman.")
     (license gpl3+)))
 
-(define-public python2-django-mailman3
-  (let ((base (package-with-python2
-               python-django-mailman3)))
-    (package
-      (inherit base)
-      (propagated-inputs
-       `(("python2-openid" ,python2-openid)
-         ,@(package-propagated-inputs base))))))
-
 (define-public postorius
   (package
     (name "postorius")
-- 
2.14.2

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

* [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3.
  2017-10-08  7:53       ` ng0
@ 2017-10-08 16:04         ` Christopher Baines
  0 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-10-08 16:04 UTC (permalink / raw)
  To: ng0; +Cc: 28726

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

On Sun, 8 Oct 2017 07:53:54 +0000
ng0 <ng0@infotropique.org> wrote:

> Cyril Roelandt transcribed 0.4K bytes:
> > On 10/06/2017 10:27 PM, Christopher Baines wrote:  
> > > The python-django-mailman3 build is still broken, as I don't
> > > think this package is compatible with python3 yet. With this
> > > patch, the tests fail due to the lack of urllib2 (which is just
> > > urllib in python3).  
> > 
> > You're right: https://gitlab.com/mailman/django-mailman3/issues/3 .
> > 
> > 
> > Shouldn't this package be removed? I believe we should only keep the
> > Python 2 version. WDYT?
> > 
> > Cyril.  
> 
> As far as I understood Harmut and Mailman back then, only some parts
> of mailman3 are python3 compatible (search the mailinglist for it).
> I seem to be remember that it was limited to frontends so far, so
> you are right it should be removed.

Ok. I've sent an updated set of patches, which includes a patch to
remove the Python 3 variant.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

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

* bug#28726: [PATCH] Update python-sqlparse and fix some dependent packages
  2017-10-06 20:20 [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
  2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
  2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
@ 2017-11-24 22:23 ` Christopher Baines
  2 siblings, 0 replies; 22+ messages in thread
From: Christopher Baines @ 2017-11-24 22:23 UTC (permalink / raw)
  To: 28726-done

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


Christopher Baines writes:

> I tried to update python-sqlparse, but it turns out that quite a few of
> the dependant packages were broken already.
>
> I've managed to fix all but one of them. The python-django-mailman3
> package still fails to build, I think because it (or at least the
> testsuite) is not compatible with python 3.
>
> Christopher Baines (5):
>   gnu: django: Fix the build for python-django-gravatar2.
>   gnu: django: Fix building python-django-allauth.
>   gnu: django: Fix building python2-django-mailman3.
>   gnu: python: Disable tests for python-graphene.
>   gnu: python: Update python-sqlparse.
>
>  gnu/packages/django.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++---
>  gnu/packages/mail.scm   | 11 ++++++++++
>  gnu/packages/python.scm |  7 +++++--
>  3 files changed, 67 insertions(+), 5 deletions(-)

So, I left this for so long that the update I was trying to do was done
by someone else (in [1]), which is fine, but there was still some stuff
to finish off here.

As above, some of the dependant packages were broken already. I've
checked this just now, and pushed a couple of the patches that were
being tracked in this bug, the python-django-allauth fix, and the
removal of python-django-mailman3.

I've left the python-django-gravatar2 fix for now, as there were some
open questions about the change in source from PyPI.

1: 8d688cd27f267f4d143d0f20ed3c352188151302

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

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

end of thread, other threads:[~2017-11-24 22:25 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 20:20 [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
2017-10-06 20:26 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Christopher Baines
2017-10-06 20:26   ` [bug#28726] [PATCH 2/5] gnu: django: Fix building python-django-allauth Christopher Baines
2017-10-06 20:27   ` [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3 Christopher Baines
2017-10-08  3:42     ` Cyril Roelandt
2017-10-08  7:53       ` ng0
2017-10-08 16:04         ` Christopher Baines
2017-10-06 20:27   ` [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene Christopher Baines
2017-10-08  3:32     ` Cyril Roelandt
2017-10-08  7:55       ` ng0
2017-10-06 20:27   ` [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse Christopher Baines
2017-10-08  3:39     ` Cyril Roelandt
2017-10-08  3:30   ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Cyril Roelandt
2017-10-08 14:52     ` Christopher Baines
2017-10-08 16:02       ` Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
2017-10-08 16:03   ` [bug#28726] [PATCH 2/6] gnu: django: Fix building python-django-allauth Christopher Baines
2017-10-08 16:03   ` [bug#28726] [PATCH 3/6] gnu: mail: Fix building python2-django-mailman3 Christopher Baines
2017-10-08 16:03   ` [bug#28726] [PATCH 4/6] gnu: python: Disable tests for python-graphene Christopher Baines
2017-10-08 16:03   ` [bug#28726] [PATCH 5/6] gnu: python: Update python-sqlparse Christopher Baines
2017-10-08 16:03   ` [bug#28726] [PATCH 6/6] gnu: mail: Remove python-django-mailman3 Christopher Baines
2017-11-24 22:23 ` bug#28726: [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines

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).