diff options
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/django.scm | 67 | ||||
| -rw-r--r-- | gnu/packages/mail.scm | 2 | ||||
| -rw-r--r-- | gnu/packages/patchutils.scm | 2 |
3 files changed, 50 insertions, 21 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index dd066b5d672..1cc7199eef6 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> | 6 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
| 7 | ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com> | 7 | ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com> |
| 8 | ;;; Copyright © 2019 Sam <smbaines8@gmail.com> | 8 | ;;; Copyright © 2019 Sam <smbaines8@gmail.com> |
| 9 | ;;; Copyright © 2020 Marius Bakke <marius@gnu.org> | ||
| 9 | ;;; | 10 | ;;; |
| 10 | ;;; This file is part of GNU Guix. | 11 | ;;; This file is part of GNU Guix. |
| 11 | ;;; | 12 | ;;; |
| @@ -45,43 +46,55 @@ | |||
| 45 | (define-public python-django | 46 | (define-public python-django |
| 46 | (package | 47 | (package |
| 47 | (name "python-django") | 48 | (name "python-django") |
| 48 | (version "1.11.29") | 49 | (version "3.1.1") |
| 49 | (source (origin | 50 | (source (origin |
| 50 | (method url-fetch) | 51 | (method url-fetch) |
| 51 | (uri (pypi-uri "Django" version)) | 52 | (uri (pypi-uri "Django" version)) |
| 52 | (sha256 | 53 | (sha256 |
| 53 | (base32 | 54 | (base32 |
| 54 | "171jsi54fbnxzi2n3l4hkdmmwfnfrwacs180rw59l0bqcvxsw022")))) | 55 | "0bzwy58hrxbsh7szak1yfh7qvvfnpdpi8ay1x7d3pvbkm1f15j2r")))) |
| 55 | (build-system python-build-system) | 56 | (build-system python-build-system) |
| 56 | (arguments | 57 | (arguments |
| 57 | '(#:modules ((srfi srfi-1) | 58 | '(#:phases |
| 58 | (guix build python-build-system) | ||
| 59 | (guix build utils)) | ||
| 60 | #:phases | ||
| 61 | (modify-phases %standard-phases | 59 | (modify-phases %standard-phases |
| 62 | (add-before 'check 'set-tzdir | 60 | (add-before 'check 'pre-check |
| 63 | (lambda* (#:key inputs #:allow-other-keys) | 61 | (lambda* (#:key inputs #:allow-other-keys) |
| 64 | ;; The test-suite tests timezone-dependent functions, thus tzdata | 62 | ;; The test-suite tests timezone-dependent functions, thus tzdata |
| 65 | ;; needs to be available. | 63 | ;; needs to be available. |
| 66 | (setenv "TZDIR" | 64 | (setenv "TZDIR" |
| 67 | (string-append (assoc-ref inputs "tzdata") | 65 | (string-append (assoc-ref inputs "tzdata") |
| 68 | "/share/zoneinfo")) | 66 | "/share/zoneinfo")) |
| 69 | #t)) | 67 | |
| 70 | (replace 'check | 68 | ;; Disable test for incorrect timezone: it only raises the |
| 71 | (lambda* (#:key inputs #:allow-other-keys) | 69 | ;; expected error when /usr/share/zoneinfo exists, even though |
| 72 | (setenv "PYTHONPATH" | 70 | ;; the machinery gracefully falls back to TZDIR. According to |
| 73 | (string-append ".:" (getenv "PYTHONPATH"))) | 71 | ;; django/conf/__init__.py, lack of /usr/share/zoneinfo is |
| 72 | ;; harmless, so just ignore this test. | ||
| 73 | (substitute* "tests/settings_tests/tests.py" | ||
| 74 | ((".*def test_incorrect_timezone.*" all) | ||
| 75 | (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n" | ||
| 76 | all))) | ||
| 77 | |||
| 78 | ;; Preserve the PYTHONPATH created by Guix when running the tests. | ||
| 74 | (substitute* "tests/admin_scripts/tests.py" | 79 | (substitute* "tests/admin_scripts/tests.py" |
| 75 | (("python_path = \\[") | 80 | (("python_path = \\[") |
| 76 | (string-append "python_path = ['" | 81 | (string-append "python_path = ['" |
| 77 | (find (lambda (entry) | 82 | (string-join |
| 78 | (string-prefix? | 83 | (string-split (getenv "PYTHONPATH") #\:) |
| 79 | (assoc-ref inputs "python-pytz") | 84 | "','") |
| 80 | entry)) | ||
| 81 | (string-split (getenv "PYTHONPATH") | ||
| 82 | #\:)) | ||
| 83 | "', "))) | 85 | "', "))) |
| 84 | (invoke "python" "tests/runtests.py")))))) | 86 | |
| 87 | #t)) | ||
| 88 | (replace 'check | ||
| 89 | (lambda _ | ||
| 90 | (with-directory-excursion "tests" | ||
| 91 | (setenv "PYTHONPATH" | ||
| 92 | (string-append "..:" (getenv "PYTHONPATH"))) | ||
| 93 | (invoke "python" "runtests.py" | ||
| 94 | ;; By default tests run in parallel, which may cause | ||
| 95 | ;; various race conditions. Run sequentially for | ||
| 96 | ;; consistent results. | ||
| 97 | "--parallel=1"))))))) | ||
| 85 | ;; TODO: Install extras/django_bash_completion. | 98 | ;; TODO: Install extras/django_bash_completion. |
| 86 | (native-inputs | 99 | (native-inputs |
| 87 | `(("tzdata" ,tzdata-for-tests) | 100 | `(("tzdata" ,tzdata-for-tests) |
| @@ -99,6 +112,7 @@ | |||
| 99 | ("python-tblib" ,python-tblib))) | 112 | ("python-tblib" ,python-tblib))) |
| 100 | (propagated-inputs | 113 | (propagated-inputs |
| 101 | `(("python-argon2-cffi" ,python-argon2-cffi) | 114 | `(("python-argon2-cffi" ,python-argon2-cffi) |
| 115 | ("python-asgiref" ,python-asgiref) | ||
| 102 | ("python-bcrypt" ,python-bcrypt) | 116 | ("python-bcrypt" ,python-bcrypt) |
| 103 | ("python-pytz" ,python-pytz))) | 117 | ("python-pytz" ,python-pytz))) |
| 104 | (home-page "https://www.djangoproject.com/") | 118 | (home-page "https://www.djangoproject.com/") |
| @@ -125,6 +139,21 @@ to the @dfn{don't repeat yourself} (DRY) principle.") | |||
| 125 | ;; required. | 139 | ;; required. |
| 126 | ,@(package-native-inputs base)))))) | 140 | ,@(package-native-inputs base)))))) |
| 127 | 141 | ||
| 142 | (define-public python-django-2.2 | ||
| 143 | (package | ||
| 144 | (inherit python-django) | ||
| 145 | (version "2.2.16") | ||
| 146 | (source (origin | ||
| 147 | (method url-fetch) | ||
| 148 | (uri (pypi-uri "Django" version)) | ||
| 149 | (sha256 | ||
| 150 | (base32 | ||
| 151 | "1535g2r322cl4x52fb0dmzlbg23539j2wx6027j54p22xvjlbkv2")))) | ||
| 152 | (native-inputs | ||
| 153 | `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite. | ||
| 154 | ("python-selenium" ,python-selenium) | ||
| 155 | ,@(package-native-inputs python-django))))) | ||
| 156 | |||
| 128 | (define-public python-django-extensions | 157 | (define-public python-django-extensions |
| 129 | (package | 158 | (package |
| 130 | (name "python-django-extensions") | 159 | (name "python-django-extensions") |
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index c9edde65bec..2f26cf09ef6 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm | |||
| @@ -3118,7 +3118,7 @@ which sends emails to HyperKitty, the official Mailman3 web archiver.") | |||
| 3118 | "--settings=hyperkitty.tests.settings_test")))))) | 3118 | "--settings=hyperkitty.tests.settings_test")))))) |
| 3119 | (propagated-inputs | 3119 | (propagated-inputs |
| 3120 | `(("python-dateutil" ,python-dateutil) | 3120 | `(("python-dateutil" ,python-dateutil) |
| 3121 | ("python-django" ,python-django) | 3121 | ("python-django" ,python-django-2.2) |
| 3122 | ("python-django-compressor" ,python-django-compressor) | 3122 | ("python-django-compressor" ,python-django-compressor) |
| 3123 | ("python-django-extensions" ,python-django-extensions) | 3123 | ("python-django-extensions" ,python-django-extensions) |
| 3124 | ("python-django-gravatar2" ,python-django-gravatar2) | 3124 | ("python-django-gravatar2" ,python-django-gravatar2) |
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index c26977be1f1..335d251e746 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm | |||
| @@ -467,7 +467,7 @@ if __name__ == \"__main__\": | |||
| 467 | (inputs | 467 | (inputs |
| 468 | `(("python-wrapper" ,python-wrapper))) | 468 | `(("python-wrapper" ,python-wrapper))) |
| 469 | (propagated-inputs | 469 | (propagated-inputs |
| 470 | `(("python-django" ,python-django) | 470 | `(("python-django" ,python-django-2.2) |
| 471 | ;; TODO: Make this configurable | 471 | ;; TODO: Make this configurable |
| 472 | ("python-psycopg2" ,python-psycopg2) | 472 | ("python-psycopg2" ,python-psycopg2) |
| 473 | ("python-mysqlclient" ,python-mysqlclient) | 473 | ("python-mysqlclient" ,python-mysqlclient) |
