Patchwork [1/2] gnu: add python-django.

login
register
mail settings
Submitter Hartmut Goebel
Date Sept. 15, 2016, 8:20 p.m.
Message ID <2289cc58-91c6-5782-0bb5-fbd393c3622f@crazy-compilers.com>
Download mbox | patch
Permalink /patch/15680/
State New
Headers show

Comments

Hartmut Goebel - Sept. 15, 2016, 8:20 p.m.
Hello Ludo,
> Do you want to send a patch to fix this?
enclosed please find the patch. Please double check to ensure I did not
re-mix-it-up :-) In case of any doubt, please ask.
Ludovic Courtès - Sept. 19, 2016, 2:42 p.m.
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> From d945e207eeb6b6bf61019a18bdaf3397883f5cb3 Mon Sep 17 00:00:00 2001
> From: Hartmut Goebel <h.goebel@crazy-compilers.com>
> Date: Thu, 15 Sep 2016 22:07:29 +0200
> Subject: [PATCH] gnu: python-django, python2-django: Fix propagated- and
>  native-inputs.
>
> setuptools is a run-time dependency (sic!), all others are required
> for testing only.
>
> * gnu/packages/django.scm (python-django) [propagated-inputs,
>   native-inputs]: Exchange them. Move tzdata to new native-inputs.
>   Enhance comments.
>   (python2-django) [propagated-inputs] change into native-inputs.
>   Enhance comment.

Applied.  Thanks and apologies again for the mess!

Ludo’.
Hartmut Goebel - Sept. 19, 2016, 2:58 p.m.
Am 19.09.2016 um 16:42 schrieb Ludovic Courtès:
> Thanks and apologies again for the mess!
>
Never mind. This can happen.

Patch

From d945e207eeb6b6bf61019a18bdaf3397883f5cb3 Mon Sep 17 00:00:00 2001
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Thu, 15 Sep 2016 22:07:29 +0200
Subject: [PATCH] gnu: python-django, python2-django: Fix propagated- and
 native-inputs.

setuptools is a run-time dependency (sic!), all others are required
for testing only.

* gnu/packages/django.scm (python-django) [propagated-inputs,
  native-inputs]: Exchange them. Move tzdata to new native-inputs.
  Enhance comments.
  (python2-django) [propagated-inputs] change into native-inputs.
  Enhance comment.
---
 gnu/packages/django.scm | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index b9232e2..b2589cc 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -54,16 +54,17 @@ 
                      (string-append ".:" (getenv "PYTHONPATH")))
              (zero? (system* "python" "tests/runtests.py")))))))
     ;; TODO: Install extras/django_bash_completion.
-    (native-inputs
+    (propagated-inputs
      ;; Django uses 'pkg_resources' (part of setuptools) to locate templates
      ;; at run-time.
-     `(("python-setuptools" ,python-setuptools)
-       ("tzdata", tzdata)))
-    (propagated-inputs
-     `( ;; bcrypt and argon2-cffi are extra requirements not yet in guix
+     `(("python-setuptools" ,python-setuptools)))
+    (native-inputs
+     `(("tzdata", tzdata)
+       ;; bcrypt and argon2-cffi are extra requirements not yet in guix
        ;;("python-argon2-cffi" ,python-argon2-cffi) ; >= 16.1.0
        ;;("python-bcrypt" ,python-bcrypt) ; not py-bcrypt!
-       ;; Taken from tests/requirements/py3.txt.
+       ;; Remaining packages are test requirements taken from
+       ;; tests/requirements/py3.txt
        ("python-docutils" ,python-docutils)
        ;; optional for tests: ("python-geoip2" ,python-geoip2)
        ("python-jinja2" ,python-jinja2)           ; >= 2.7
@@ -89,8 +90,9 @@  to the @dfn{don't repeat yourself} (DRY) principle.")
   (let ((base (package-with-python2 (strip-python2-variant python-django))))
     (package
       (inherit base)
-      (propagated-inputs
-       `(;; Required for Python 2: enum34 and mock.
+      (native-inputs
+       `(;; Test requirements for Python 2 taken from
+         ;; tests/requirements/py3.txt: enum34 and mock.
          ("python2-enum34" ,python2-enum34)
          ("python2-mock" ,python2-mock)
          ;; When adding memcached mind: for Python 2 memcached <= 1.53 is
-- 
2.7.4