From 5ede81018558b1a53c7f71084ff81fb6b2ea6446 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 18:20:38 +0200 Subject: gnu: python-django-auth-ldap: Update to 2.4.0. * gnu/packages/django.scm (python-django-auth-ldap): Update to 2.4.0. --- gnu/packages/django.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index dfc3d314ad..7ec922be92 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -1163,13 +1163,13 @@ (define-public python-django-override-storage (define-public python-django-auth-ldap (package (name "python-django-auth-ldap") - (version "2.2.0") + (version "2.4.0") (source (origin (method url-fetch) (uri (pypi-uri "django-auth-ldap" version)) (sha256 (base32 - "1gq49l5lv6ar6yf73c8pix8n7md4109yq31s5jfk64w6n1rigbqi")))) + "0xk6cxiqz5j3q79bd54x64f26alrlc8p7k9wkp2c768w2k1vzz30")))) (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases -- cgit v1.2.3 From 3239a2d5a5eab6362cda865153325ca0c0a71546 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 21:49:36 +0200 Subject: gnu: python-django-debug-toolbar: Update to 3.2.1. * gnu/packages/django.scm (python-django-debug-toolbar): Update to 3.2.1. --- gnu/packages/django.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 7ec922be92..2b3d07c759 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -469,7 +469,7 @@ (define-public python-django-allauth (define-public python-django-debug-toolbar (package (name "python-django-debug-toolbar") - (version "2.2") + (version "3.2.1") (source (origin (method git-fetch) @@ -479,7 +479,7 @@ (define-public python-django-debug-toolbar (file-name (git-file-name name version)) (sha256 (base32 - "14069rlgjd5g724iaglai0nc636g9km4ba56r4j3k84chibqzn03")))) + "1m1j2sx7q0blma0miswj3c8hrfi5q4y5cq2b816v8gagy89xgc57")))) (build-system python-build-system) (propagated-inputs `(("python-sqlparse" ,python-sqlparse))) -- cgit v1.2.3 From 7cacd8c8dab02dff48a096b6c8f6c3cd4e1161bb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 21:52:56 +0200 Subject: gnu: python-django-picklefield: Test with Django 2.2. * gnu/packages/django.scm (python-django-picklefield)[native-inputs]: Change from PYTHON-DJANGO to PYTHON-DJANGO-2.2. --- gnu/packages/django.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 2b3d07c759..0299e60433 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -663,7 +663,10 @@ (define-public python-django-picklefield (lambda _ (invoke "python" "-m" "django" "test" "-v2" "--settings=tests.settings")))))) - (native-inputs `(("python-django" ,python-django))) + (native-inputs + ;; XXX: Picklefield has not been updated in 10+ years and fails tests + ;; with Django 3.2. + `(("python-django@2.2" ,python-django-2.2))) (synopsis "Pickled object field for Django") (description "Pickled object field for Django") (license license:expat))) -- cgit v1.2.3 From 4ae8390ffc23cbe70df888d88646941207701845 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 21:57:32 +0200 Subject: gnu: python-djangorestframework: Update to 3.12.4. * gnu/packages/django.scm (python-djangorestframework): Update to 3.12.4. --- gnu/packages/django.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 0299e60433..9b5593f709 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -1015,14 +1015,14 @@ (define-public python-django-tagging (define-public python-djangorestframework (package (name "python-djangorestframework") - (version "3.12.1") + (version "3.12.4") (source (origin (method url-fetch) (uri (pypi-uri "djangorestframework" version)) (sha256 (base32 - "0jb22psb823vh5fj9az63p5lgyax9ygjy2faah16ajxvvsp54i6m")))) + "1wm7q3vp4226n6fhjnkjxg6pgh95p6ag238rg7l7dj6sind98izp")))) (build-system python-build-system) (arguments '(;; No included tests -- cgit v1.2.3 From e35522238244961331a8f0a7059362a8ceeef6ed Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 21:21:03 +0200 Subject: gnu: python-django: Support '--without-tests'. * gnu/packages/django.scm (python-django)[arguments]: Test for TESTS? in the 'check' phase. --- gnu/packages/django.scm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 9b5593f709..b5a5cd3045 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018 Vijayalakshmi Vedantham ;;; Copyright © 2019 Sam -;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2020, 2021 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -87,15 +87,17 @@ (define-public python-django #t)) (replace 'check - (lambda _ - (with-directory-excursion "tests" - (setenv "PYTHONPATH" - (string-append "..:" (getenv "PYTHONPATH"))) - (invoke "python" "runtests.py" - ;; By default tests run in parallel, which may cause - ;; various race conditions. Run sequentially for - ;; consistent results. - "--parallel=1"))))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (with-directory-excursion "tests" + (setenv "PYTHONPATH" + (string-append "..:" (getenv "PYTHONPATH"))) + (invoke "python" "runtests.py" + ;; By default tests run in parallel, which may cause + ;; various race conditions. Run sequentially for + ;; consistent results. + "--parallel=1")) + (format #t "test suite not run~%"))))))) ;; TODO: Install extras/django_bash_completion. (native-inputs `(("tzdata" ,tzdata-for-tests) -- cgit v1.2.3 From 249fb4a30345f6687645911bb22cbf43548b4c4d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 21:29:28 +0200 Subject: gnu: python-django: Update to 3.2.1. * gnu/packages/django.scm (python-django): Update to 3.2.1. --- gnu/packages/django.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index b5a5cd3045..520f7160b9 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -47,13 +47,13 @@ (define-module (gnu packages django) (define-public python-django (package (name "python-django") - (version "3.1.8") + (version "3.2.1") (source (origin (method url-fetch) (uri (pypi-uri "Django" version)) (sha256 (base32 - "1b0ymqv09b523k3c2jnpb2gjy2fsy6irbfyc2g9x5hjyw41k2fgq")))) + "1pgwzygcx5gq4r0hpg9fdig7jplafv184ay9vsx4l88z1xskrhcm")))) (build-system python-build-system) (arguments '(#:phases -- cgit v1.2.3 From 2bb74d8a131fd9dd1d315ecd965a3e0b4d3006de Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 May 2021 22:43:08 +0200 Subject: gnu: python-django: Disable django-admin wrapper. * gnu/packages/django.scm (python-django)[arguments]: Delete 'wrap' phase. [native-inputs]: Move PYTHON-JINJA2 ... [propagated-inputs]: ... here. While at it, add a comment about which inputs are optional and adjust order accordingly. --- gnu/packages/django.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 520f7160b9..7dee3afae4 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -97,7 +97,13 @@ (define-public python-django ;; various race conditions. Run sequentially for ;; consistent results. "--parallel=1")) - (format #t "test suite not run~%"))))))) + (format #t "test suite not run~%")))) + ;; XXX: The 'wrap' phase adds native inputs as runtime dependencies, + ;; see . The django-admin script typically + ;; runs in an environment that has Django and its dependencies on + ;; PYTHONPATH, so just disable the wrapper to reduce the size from + ;; ~710 MiB to ~203 MiB. + (delete 'wrap)))) ;; TODO: Install extras/django_bash_completion. (native-inputs `(("tzdata" ,tzdata-for-tests) @@ -105,7 +111,6 @@ (define-public python-django ;; tests/requirements/py3.txt ("python-docutils" ,python-docutils) ;; optional for tests: ("python-geoip2" ,python-geoip2) - ("python-jinja2" ,python-jinja2) ; >= 2.7 ;; optional for tests: ("python-memcached" ,python-memcached) ("python-numpy" ,python-numpy) ("python-pillow" ,python-pillow) @@ -113,14 +118,17 @@ (define-public python-django ;; optional for tests: ("python-selenium" ,python-selenium) ("python-tblib" ,python-tblib))) (propagated-inputs - `(("python-argon2-cffi" ,python-argon2-cffi) - ("python-asgiref" ,python-asgiref) - ("python-bcrypt" ,python-bcrypt) + `(("python-asgiref" ,python-asgiref) ("python-pytz" ,python-pytz) + ("python-sqlparse" ,python-sqlparse) + + ;; Optional dependencies. + ("python-argon2-cffi" ,python-argon2-cffi) + ("python-bcrypt" ,python-bcrypt) ;; This input is not strictly required, but in practice many Django ;; libraries need it for test suites and similar. - ("python-sqlparse" ,python-sqlparse))) + ("python-jinja2" ,python-jinja2))) (home-page "https://www.djangoproject.com/") (synopsis "High-level Python Web framework") (description -- cgit v1.2.3 From 544d436ca8ded35d6ebd928df16af7c53d6ff366 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 6 May 2021 15:43:02 +0200 Subject: gnu: python-django: Update to 3.2.2. * gnu/packages/django.scm (python-django): Update to 3.2.2. --- gnu/packages/django.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 7dee3afae4..e962e87fda 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -47,13 +47,13 @@ (define-module (gnu packages django) (define-public python-django (package (name "python-django") - (version "3.2.1") + (version "3.2.2") (source (origin (method url-fetch) (uri (pypi-uri "Django" version)) (sha256 (base32 - "1pgwzygcx5gq4r0hpg9fdig7jplafv184ay9vsx4l88z1xskrhcm")))) + "0gffaabnnpzj0sl3jl7mllvi3gc0jvab6xw2bckvyljwsrd1j78a")))) (build-system python-build-system) (arguments '(#:phases -- cgit v1.2.3 From 64b08bf7f8aa726e5497074567192e985f133824 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 6 May 2021 15:43:48 +0200 Subject: gnu: python-django@2.2: Update to 2.2.22. * gnu/packages/django.scm (python-django-2.2): Update to 2.2.22. --- gnu/packages/django.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index e962e87fda..5ec1c57005 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -142,13 +142,13 @@ (define-public python-django (define-public python-django-2.2 (package (inherit python-django) - (version "2.2.20") + (version "2.2.22") (source (origin (method url-fetch) (uri (pypi-uri "Django" version)) (sha256 (base32 - "0r3a6gbhwngxl172yy6n0sq5knibl2vxc0wbk1g8licfbzfgjs95")))) + "0q30zjcmnvwp1v1syn739wapahs2dx784n0yjyypq0cr3kdi88nv")))) (native-inputs `(;; XXX: In 2.2 and 3.0, selenium is required for the test suite. ("python-selenium" ,python-selenium) -- cgit v1.2.3 From a0365cf0073c550ef00baf462ce4875552867d36 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 7 May 2021 13:41:52 +0200 Subject: gnu: python-djangorestframework: Enable tests. * gnu/packages/django.scm (python-djangorestframework)[source]: Change to GIT-FETCH. [arguments]: Remove #:tests?. Add #:phases. [native-inputs]: New field. --- gnu/packages/django.scm | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index 5ec1c57005..df143dcab7 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -1028,15 +1028,33 @@ (define-public python-djangorestframework (version "3.12.4") (source (origin - (method url-fetch) - (uri (pypi-uri "djangorestframework" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/encode/django-rest-framework") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1wm7q3vp4226n6fhjnkjxg6pgh95p6ag238rg7l7dj6sind98izp")))) + "16n17dw35wqv47m8k8fixn0yywrvd6v4r573yr4nx6lbbiyi2cqn")))) (build-system python-build-system) (arguments - '(;; No included tests - #:tests? #f)) + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + ;; Add a fix from the master branch for compatibility with Django + ;; 3.2: https://github.com/encode/django-rest-framework/pull/7911 + ;; Remove for versions > 3.12.4. + (substitute* "tests/test_fields.py" + (("class MockTimezone:") + "class MockTimezone(pytz.BaseTzInfo):")) + (if tests? + (invoke "python" "runtests.py" "--nolint") + (format #t "test suite not run~%"))))))) + (native-inputs + `(("python-django" ,python-django) + ("python-pytest" ,python-pytest) + ("python-pytest-django" ,python-pytest-django))) (home-page "https://www.django-rest-framework.org") (synopsis "Toolkit for building Web APIs with Django") (description -- cgit v1.2.3 From f387523c6214fa276cf38fc9f9dd2fc68b21e75c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 7 May 2021 13:49:24 +0200 Subject: gnu: python-django-netfields: Remove obsolete input. * gnu/packages/django.scm (python-django-netfields)[propagated-inputs]: Remove PYTHON-IPADDRESS. --- gnu/packages/django.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/django.scm') diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index df143dcab7..debdd22d12 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -1267,8 +1267,7 @@ (define-public python-django-netfields (native-inputs `(("python-django" ,python-django))) (propagated-inputs - `(("python-ipaddress" ,python-ipaddress) - ("python-netaddr" ,python-netaddr) + `(("python-netaddr" ,python-netaddr) ("python-six" ,python-six))) (home-page "https://github.com/jimfunk/django-postgresql-netfields") (synopsis "PostgreSQL netfields implementation for Django") -- cgit v1.2.3