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.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Hartmut Goebel 2016-09-15 22:07:29 +02:00 committed by Ludovic Courtès
parent 4a84a48742
commit dfdaea32e9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 10 additions and 8 deletions

View File

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