summaryrefslogtreecommitdiff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/django.scm')
-rw-r--r--gnu/packages/django.scm710
1 files changed, 457 insertions, 253 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 4d428d4686..a16346a8f8 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -7,11 +7,12 @@
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
;;; Copyright © 2020, 2021, 2022, 2023 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2021 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2025 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2025 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -38,6 +39,7 @@
#:use-module (guix build-system python)
#:use-module (guix deprecation)
#:use-module (guix search-paths)
+ #:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
@@ -51,6 +53,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-compression)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -137,16 +140,76 @@ a system that allows you to easily communicate between processes, and separate
your project into different processes.")
(license license:bsd-3)))
-(define-public python-django-4.2
+(define-public python-crispy-bootstrap3
+ (package
+ (name "python-crispy-bootstrap3")
+ (version "2024.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/django-crispy-forms/crispy-bootstrap3")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ncf8hz3yf8h0asvyi1g54ds0glp46zfcr6sklhsynbqzmcqd463"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "PYTHONPATH" "."))))))
+ (propagated-inputs (list python-django-4 python-django-crispy-forms))
+ (native-inputs (list python-pytest python-pytest-django python-setuptools))
+ (home-page "https://github.com/django-crispy-forms/crispy-bootstrap3")
+ (synopsis "Bootstrap3 template pack for django-crispy-forms")
+ (description
+ "This package provides a bootstrap3 template pack for
+@code{python-django-crispy-forms}.")
+ (license license:expat)))
+
+(define-public python-crispy-bootstrap4
+ (package
+ (name "python-crispy-bootstrap4")
+ (version "2025.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/django-crispy-forms/crispy-bootstrap4")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0kyyyrg39ckqw3pmsq67g5xzgmcd7xjgz7vpsr97gaai1frnsvnr"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "PYTHONPATH" "."))))))
+ (propagated-inputs (list python-django-4 python-django-crispy-forms))
+ (native-inputs (list python-pytest python-pytest-django python-setuptools))
+ (home-page "https://github.com/django-crispy-forms/crispy-bootstrap4")
+ (synopsis "Bootstrap4 template pack for django-crispy-forms")
+ (description
+ "This package provides a bootstrap4 template pack for
+@code{python-django-crispy-forms}.")
+ (license license:expat)))
+
+(define-public python-django
(package
(name "python-django")
- (version "4.2.16")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "Django" version))
- (sha256
- (base32
- "1b8xgwg3gjr974j60x3vgcpp85cg5dwhzqdpdbl8qh3cg311c5kg"))))
+ (version "5.2.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django" version))
+ (sha256
+ (base32 "0yx82k8iilz8l6wkdvjcrz75i144lf211xybrrrks6b34wvh0pns"))))
(build-system pyproject-build-system)
(arguments
'(#:test-flags
@@ -174,6 +237,12 @@ your project into different processes.")
((".*def test_incorrect_timezone.*" all)
(string-append " @unittest.skip('Disabled by Guix')\n"
all)))))
+ (add-before 'check 'delete-sitecustomize
+ (lambda* _
+ ;; This file gets loaded instead of the GUIX sitecustomize.py,
+ ;; so we end up ignoring GUIX_PYTHONPATH and breaking imports.
+ ;; It only contains a coverage hook that we don't need here.
+ (delete-file "tests/sitecustomize.py")))
(replace 'check
(lambda* (#:key tests? test-flags #:allow-other-keys)
(if tests?
@@ -229,37 +298,38 @@ to the @dfn{don't repeat yourself} (DRY) principle.")
;; This CVE seems fixed since 4.2.1.
(lint-hidden-cve . ("CVE-2023-31047"))))))
-;; archivebox requires django>=3.1.3,<3.2
-(define-public python-django-3.1.14
+(define-public python-django-4
(package
- (inherit python-django-4.2)
- (version "3.1.14")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "Django" version))
- (sha256
- (base32
- "0ix3v2wlnplv78zxjrlw8z3hiap2d5mxvk0ny2fc65526shsb93j"))))
- (propagated-inputs
- (modify-inputs (package-propagated-inputs python-django-4.2)
- ;; Django 4.0 deprecated pytz in favor of Pythons built-in zoneinfo.
- (append python-pytz)))))
-
-(define-public python-django python-django-4.2)
+ (inherit python-django)
+ (name "python-django-4")
+ (version "4.2.23")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django" version))
+ (sha256
+ (base32 "1r7sbhllc6d903di0ydqy737s28m223lgpk69y6xhjb4dsxfmza2"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-django)
+ ((#:phases phases)
+ #~(modify-phases #$phases (delete 'delete-sitecustomize)))))))
(define-public python-django-cache-url
(package
(name "python-django-cache-url")
(version "3.4.5")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "django-cache-url" version))
- (sha256
- (base32
- "05yr19gi5ln6za0y9nf184klaixnf1dr1nfajn63893mf6ab37zb"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/epicserve/django-cache-url")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1a5vd07wrnfbclvf6pz9p8ag9kdd1453lsl9q0bkyc45hq2xqd2a"))))
(build-system pyproject-build-system)
(native-inputs
- (list python-django python-setuptools python-wheel))
+ (list python-django python-pytest python-pytest-cov python-setuptools))
(home-page "https://github.com/epicserve/django-cache-url")
(synopsis "Configure Django cache settings from URLs")
(description
@@ -281,6 +351,10 @@ with a @var{CACHE_URL} environment variable.")
(arguments
(list #:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'skip-bad-test
+ (lambda _
+ (substitute* "tests/test_values.py"
+ (("test_database_url_value") "_test_database_url_value"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -291,7 +365,7 @@ with a @var{CACHE_URL} environment variable.")
(string-append ".:" (getenv "GUIX_PYTHONPATH")))
(invoke "django-cadmin" "test" "-v2")))))))
(propagated-inputs
- (list python-django))
+ (list python-django-4))
(native-inputs
(list python-dj-database-url
python-dj-email-url
@@ -343,9 +417,9 @@ and adapters that are useful for non-trivial configuration scenarios.")
python-pytest
python-pytest-cov ; runs by default
python-pytest-django
- python-setuptools-next
+ python-setuptools
python-shortuuid
- python-wheel))
+ tzdata-for-tests))
(home-page "https://github.com/django-extensions/django-extensions")
(synopsis "Custom management extensions for Django")
(description
@@ -416,7 +490,7 @@ that are useful for particular countries or cultures.")
(native-inputs
(list python-mock python-setuptools python-wheel))
(propagated-inputs
- (list python-django python-six))
+ (list python-django-4 python-six))
(synopsis "Easy-to-use math field/widget captcha for Django forms")
(description
"A multi-value-field that presents a human answerable question,
@@ -429,18 +503,27 @@ with arguments to the field constructor.")
(name "python-django-classy-tags")
(version "4.1.0")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "django-classy-tags" version))
- (sha256
- (base32
- "0ngffhbicyx1j0j0nxdvbg9bhs9ss88xvx3dhr6irrx65ymd3nf8"))))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/divio/django-classy-tags")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "10xl1knpvnfjlc5mm0lyy62di463nwcgikdr18bqb1gxipfk6br4"))))
(build-system pyproject-build-system)
- (native-inputs
- (list python-setuptools
- python-wheel))
- (propagated-inputs
- (list python-django))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
+ (invoke "django-admin" "test" "tests"
+ "--pythonpath=.")))))))
+ (native-inputs (list python-setuptools))
+ (propagated-inputs (list python-django))
(home-page "https://github.com/divio/django-classy-tags")
(synopsis "Class based template tags for Django")
(description
@@ -486,14 +569,14 @@ when coding custom template tags.")
(define-public python-easy-thumbnails
(package
(name "python-easy-thumbnails")
- (version "2.10")
+ (version "2.10.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "easy_thumbnails" version))
(sha256
(base32
- "1xafj3lh4841y960wq6lnw31lbki8k84dvg5jqjdy7krrlplc2fh"))))
+ "0bi25k1kf8gn954x6730cn76bidv7jdym8avmcsnqm47jgwsa2m5"))))
(build-system pyproject-build-system)
(arguments
(list #:test-flags '(list "--pyargs" "easy_thumbnails")))
@@ -504,7 +587,7 @@ when coding custom template tags.")
python-pytest-django
python-setuptools
python-testfixtures
- python-wheel))
+ tzdata-for-tests))
(home-page "https://github.com/SmileyChris/easy-thumbnails")
(synopsis "Easy thumbnails for Django")
(description
@@ -568,8 +651,8 @@ useful tools for testing Django applications and projects.")
python-requests
python-setuptools
python-setuptools-scm
- python-wheel
- python-whoosh))
+ python-whoosh
+ tzdata-for-tests))
(home-page "https://haystacksearch.org/")
(synopsis "Pluggable search for Django")
(description "Haystack provides modular search for Django. It features a
@@ -613,27 +696,30 @@ them do this.")
(define-public python-django-allauth
(package
(name "python-django-allauth")
- (version "65.3.1")
+ (version "65.7.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "django_allauth" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pennersr/django-allauth")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "11q56p07g987hsz7v27nrvr2piy72jhyzwjrcis3lxd2f4drabp0"))))
+ (base32 "1k5b3x7pdysb21vbqx7pxi9cm72yj057mm1clg19ymiqj4kq8yfl"))))
(build-system pyproject-build-system)
(arguments
(list
#:test-flags
;; XXX: KeyError: location
- '(list "--ignore=allauth/socialaccount/providers/openid/tests.py")
+ #~(list "--ignore=allauth/socialaccount/providers/openid/tests.py")
#:phases
#~(modify-phases %standard-phases
;; FIXME: This should be fixed in python-xmlsec
(add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "LD_LIBRARY_PATH"
- (dirname (search-input-file inputs "lib/libxmlsec1-openssl.so.1.2.37"))))))))
+ (let ((lib (search-input-file inputs "lib/libxmlsec1-openssl.so")))
+ (setenv "LD_LIBRARY_PATH"
+ (dirname lib))))))))
(propagated-inputs
(list python-asgiref
python-django
@@ -644,12 +730,17 @@ them do this.")
python-requests
python-requests-oauthlib
python-python3-saml))
+ (inputs (list xmlsec-openssl))
(native-inputs
(list tzdata-for-tests
+ python-django-ninja
+ python-django-rest-framework
+ python-oauthlib
+ python-psycopg2
python-pytest
+ python-pytest-asyncio
python-pytest-django
- python-setuptools
- python-wheel))
+ python-setuptools))
(home-page "https://github.com/pennersr/django-allauth")
(synopsis "Set of Django applications addressing authentication")
(description
@@ -658,10 +749,70 @@ registration, account management as well as 3rd party (social)
account authentication.")
(license license:expat)))
+(define-public python-django-csp
+ (package
+ (name "python-django-csp")
+ (version "4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django_csp" version))
+ (sha256
+ (base32 "0cr8f4lbv8y32gfgnw4b6cnvi8k15ggpi49jmlyhmciff2xi0w5j"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'fix-tests
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("--ruff --ruff-format") ""))
+ (setenv "PYTHONPATH" "."))))))
+ (propagated-inputs (list python-django python-packaging))
+ (native-inputs (list python-jinja2
+ python-pytest
+ python-pytest-django
+ python-setuptools))
+ (home-page "https://django-csp.readthedocs.io/en/latest/")
+ (synopsis "Django Content Security Policy support.")
+ (description "This package adds support for Content-Security-Policy headers
+to Django.")
+ (license license:bsd-3)))
+
+(define-public python-django-template-partials
+ (package
+ (name "python-django-template-partials")
+ (version "25.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django_template_partials" version))
+ (sha256
+ (base32 "1xmfjqb4alwqky0jmq03292y7m7w13mmh1yz0ayavlym2954w12m"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
+ (invoke "django-admin" "test" "--pythonpath=.")))))))
+ (propagated-inputs (list python-django))
+ (native-inputs (list python-flit-core))
+ (home-page "https://github.com/carltongibson/django-template-partials")
+ (synopsis
+ "Reusable named inline-partials for the Django Template Language")
+ (description
+ "This package provides template partials for Django, offering fragment
+reuse, integration with the template loader and inline output.")
+ (license license:expat)))
+
(define-public python-django-debug-toolbar
(package
(name "python-django-debug-toolbar")
- (version "3.2.1")
+ (version "6.0.0")
(source
(origin
(method git-fetch)
@@ -671,7 +822,7 @@ account authentication.")
(file-name (git-file-name name version))
(sha256
(base32
- "1m1j2sx7q0blma0miswj3c8hrfi5q4y5cq2b816v8gagy89xgc57"))))
+ "0rh0bkbn3z8njmaca0jjby4l9axmbgmcr34pf4sdjk99l55azmv4"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -689,10 +840,11 @@ account authentication.")
(propagated-inputs
(list python-sqlparse python-django))
(native-inputs
- (list python-django-jinja
+ (list python-django-csp
+ python-django-template-partials
+ python-hatchling
python-html5lib
python-setuptools
- python-wheel
tzdata-for-tests))
(home-page "https://github.com/jazzband/django-debug-toolbar")
(synopsis "Toolbar to help with developing Django applications")
@@ -731,17 +883,27 @@ queries done via the Django ORM, SQLAlchemy generated queries are displayed.")
(version "1.4.5")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "django-gravatar2" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/twaddington/django-gravatar")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0r03m1qkh56g92x136xdq8n92mj7gbi1fh0djarxhp9rbr35dfrd"))))
- (build-system python-build-system)
+ (base32 "0brh1176gx758cimkz36g8v760a1hadxspqanp8kc59kvx50qvm0"))))
+ (build-system pyproject-build-system)
(arguments
- '(;; TODO: The django project for the tests is missing from the release.
- #:tests? #f))
- (inputs
- (list python-django))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "example_project"
+ (invoke "python" "./manage.py" "test"
+ "-k" "not test_has_gravatar"
+ "django_gravatar"))))))))
+ (native-inputs (list python-setuptools))
+ (inputs (list python-django))
(home-page "https://github.com/twaddington/django-gravatar")
(synopsis "Gravatar support for Django, improved version")
(description
@@ -749,38 +911,6 @@ queries done via the Django ORM, SQLAlchemy generated queries are displayed.")
templatetags and a full test suite.")
(license license:expat)))
-(define-public python-django-assets
- (package
- (name "python-django-assets")
- (version "2.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "django-assets" version))
- (sha256
- (base32
- "0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa"))))
- (build-system pyproject-build-system)
- (arguments
- (list
- #:phases
- '(modify-phases %standard-phases
- (add-after 'unpack 'disable-bad-tests
- (lambda _
- (substitute* "tests/test_django.py"
- (("bundles = self.loader.load_bundles\\(\\)")
- "return")))))))
- (native-inputs
- (list python-nose python-setuptools python-wheel))
- (propagated-inputs
- (list python-django python-webassets))
- (home-page "https://github.com/miracle2k/django-assets")
- (synopsis "Asset management for Django")
- (description
- "Asset management for Django, to compress and merge CSS and Javascript
-files. Integrates the webassets library with Django, adding support for
-merging, minifying and compiling CSS and Javascript files.")
- (license license:bsd-2)))
-
(define-public python-django-jinja
(package
(name "python-django-jinja")
@@ -806,7 +936,7 @@ merging, minifying and compiling CSS and Javascript files.")
(with-directory-excursion "testing"
(invoke "python" "runtests.py"))))))))
(propagated-inputs
- (list python-django python-jinja2 python-pytz python-django-pipeline))
+ (list python-django-4 python-jinja2 python-pytz python-django-pipeline))
(native-inputs
(list python-setuptools python-wheel tzdata-for-tests))
(home-page "https://niwinz.github.io/django-jinja/latest/")
@@ -853,7 +983,9 @@ conn_max_age argument to easily enable Django’s connection pool.")
(base32
"16k91rvd9889xxrrf84a3zb0jpinizhfqdmafn54zxa8kqrf7zsm"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
+ (arguments
+ (list #:tests? #f)) ;XXX: no tests in PyPI, check in git
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/migonzalvar/dj-email-url")
(synopsis "Configure email settings from URLs")
(description
@@ -864,6 +996,7 @@ settings from URLs.")
license:cc0)))) ;configuration and data
(define-public python-dj-search-url
+ ;; XXX: No updates since 2012, consider to remove in the next refresh cycle.
(package
(name "python-dj-search-url")
(version "0.1")
@@ -874,7 +1007,9 @@ settings from URLs.")
(base32
"0h7vshhglym6af2pplkyivk6y0g0ncq0xpdzi88kq2sha9c1lka2"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
+ (arguments
+ (list #:tests? #f))
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/dstufft/dj-search-url")
(synopsis "Configure Haystack search from URLs")
(description
@@ -971,20 +1106,27 @@ for Django sites.")
(define-public python-django-contrib-comments
(package
(name "python-django-contrib-comments")
- (version "1.9.2")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "django-contrib-comments" version))
- (sha256
- (base32
- "0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-django python-six))
+ (version "2.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/django/django-contrib-comments")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17mymw64bm5f19iq6dlpcbbycamy2a0wrnfzrbnw8diysc3fsnpr"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-backend #~'custom
+ #:test-flags #~(list "tests/runtests.py")))
+ (native-inputs (list python-setuptools tzdata-for-tests))
+ (propagated-inputs (list python-django-4))
(home-page "https://github.com/django/django-contrib-comments")
(synopsis "Comments framework")
(description
- "Django used to include a comments framework; since Django 1.6 it's been
+ "Django used to include a comments framework; since Django 1.6 it's been
separated to a separate project. This is that project. This framework can be
used to attach comments to any model, so you can use it for comments on blog
entries, photos, book chapters, or anything else.")
@@ -1042,7 +1184,7 @@ to asyncio and Pydantic.")
(invoke "django-admin" "test" "tests"
"--pythonpath=.")))))))
(propagated-inputs (list python-asgiref python-django))
- (native-inputs (list python-pytest python-setuptools-next python-wheel))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://django-htmx.readthedocs.io/en/latest/")
(synopsis "Extensions for using Django with htmx")
(description "This package provides a Django extension to work with
@@ -1052,14 +1194,14 @@ to asyncio and Pydantic.")
(define-public python-django-pipeline
(package
(name "python-django-pipeline")
- (version "4.0.0")
+ (version "4.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "django_pipeline" version))
(sha256
(base32
- "125wkgi3hf1ly34ps7n63k6agb067h17ngxyf9xjykn6kl6ikc8a"))))
+ "1d12wzqvdnc3hk3s5yz9jd4xqhc75wbfsl6xdhwphnr1dzgpj7da"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -1080,12 +1222,9 @@ to asyncio and Pydantic.")
(list python-jsmin
python-css-html-js-minify))
(native-inputs
- (list python-coveralls
- python-django
+ (list python-django
python-setuptools
- python-setuptools-scm
- python-tox
- python-wheel))
+ python-setuptools-scm))
(home-page
"https://github.com/jazzband/django-pipeline")
(synopsis "Asset packaging library for Django")
@@ -1298,6 +1437,7 @@ Django Q, dependencies updates, docs updates and several bug fixes.")
(build-system pyproject-build-system)
(arguments
(list
+ #:tests? #f ; no tests.
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'use-poetry-core
@@ -1306,7 +1446,7 @@ Django Q, dependencies updates, docs updates and several bug fixes.")
(substitute* "pyproject.toml"
(("poetry.masonry.api") "poetry.core.masonry.api")))))))
(propagated-inputs (list python-sentry-sdk))
- (native-inputs (list python-poetry-core python-setuptools python-wheel))
+ (native-inputs (list python-poetry-core python-setuptools))
(home-page "https://django-q.readthedocs.org")
(synopsis "Sentry support plugin for Django Q")
(description "This package provides a Sentry support plugin for Django Q.")
@@ -1325,6 +1465,8 @@ Django Q, dependencies updates, docs updates and several bug fixes.")
(build-system pyproject-build-system)
(arguments
(list
+ ;; XXX: No tests in Pypi archive, unclear how to get it from git.
+ #:tests? #f
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'use-poetry-core
@@ -1478,7 +1620,7 @@ Django projects, which allows association of a number of tags with any
(define-public python-django-rest-framework
(package
(name "python-django-rest-framework")
- (version "3.15.2")
+ (version "3.16.1")
(source
(origin
(method git-fetch)
@@ -1488,7 +1630,7 @@ Django projects, which allows association of a number of tags with any
(file-name (git-file-name name version))
(sha256
(base32
- "0ky559g2rpbz5sir33qq56c1bd4gc73hlrnkxsxpdm5mi69jrvcx"))))
+ "01i2p1mh48bkxhggvfh6j11rh9zrgw4w6fr78msgrdw6bdjf4fwj"))))
(build-system pyproject-build-system)
(arguments
'(#:phases
@@ -1554,22 +1696,43 @@ a single block.")
(define-public python-django-crispy-forms
(package
(name "python-django-crispy-forms")
- (version "1.9.2")
+ (version "2.4")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "django-crispy-forms" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/django-crispy-forms/django-crispy-forms")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0fxlf233f49hjax786p4r650rd0ilvhnpyvw8hv1d1aqnkxy1wgj"))))
- (build-system python-build-system)
+ (base32 "1xrrcsv534p989hh1jgy4nk6sxay7g913z6zxwgpgnadzr9dfpk1"))))
+ (build-system pyproject-build-system)
(arguments
- '(;; No included tests
- #:tests? #f))
- (propagated-inputs
- (list python-django))
- (home-page
- "http://github.com/maraujop/django-crispy-forms")
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "PYTHONPATH" "."))))))
+ (native-inputs
+ (append
+ ;; XXX: python-crispy-boostrap packages and this package have a
+ ;; circular dependency. Get a bootstrap version for them.
+ (map (lambda (pkg)
+ (package/inherit pkg
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'sanity-check))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs pkg)
+ (delete "python-django-crispy-forms")))))
+ (list python-crispy-bootstrap3 python-crispy-bootstrap4))
+ (list python-pytest python-pytest-django python-setuptools)))
+ (propagated-inputs (list python-django-4))
+ (home-page "https://github.com/django-crispy-forms/django-crispy-forms")
(synopsis "Tool to control Django forms without custom templates")
(description
"@code{django-crispy-forms} lets you easily build, customize and reuse
@@ -1585,7 +1748,9 @@ forms using your favorite CSS framework, without writing template code.")
(method url-fetch)
(uri (pypi-uri "django_compressor" version))
(sha256
- (base32 "08m8cs1mnpwd2zlck8cbl4cdp21dgv4vj7j17krbgn745s5a9n61"))))
+ (base32 "08m8cs1mnpwd2zlck8cbl4cdp21dgv4vj7j17krbgn745s5a9n61"))
+ (patches
+ (search-patches "django-compressor-build-with-beautifulsoup-4.14+.patch"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -1684,27 +1849,27 @@ Amazon S3, Dropbox, local file storage or any Django storage.")
(define-public python-django-override-storage
(package
(name "python-django-override-storage")
- (version "0.3.0")
- (home-page "https://github.com/danifus/django-override-storage")
+ (version "0.3.2")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url home-page)
+ (url "https://github.com/danifus/django-override-storage")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "081kzfk7mmybhihvc92d3hsdg0r2k20ydq88fs1fgd348sq1ax51"))))
- (build-system python-build-system)
+ (base32 "1zxfzawhcm1lnxl0d025z6ipgfarvqr2jyl4cg7680gs73m5ikw5"))))
+ (build-system pyproject-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "python" "runtests.py"))))))
- (native-inputs
- (list python-mock))
- (propagated-inputs
- (list python-django))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "python" "runtests.py"))))))
+ (native-inputs (list python-mock python-setuptools))
+ (propagated-inputs (list python-django))
+ (home-page "https://github.com/danifus/django-override-storage")
(synopsis "Django test helpers to manage file storage side effects")
(description
"This project provides tools to help reduce the side effects of using
@@ -1760,44 +1925,32 @@ backends in a single library.")
(define-public python-django-auth-ldap
(package
(name "python-django-auth-ldap")
- (version "4.1.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "django-auth-ldap" version))
- (sha256
- (base32
- "0jd9jms9qpa92fk5n7gqcxjk3zs6ay79r73ann7cw1vqn79lkxvp"))))
- (build-system python-build-system)
+ (version "4.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/django-auth-ldap/django-auth-ldap")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "11mgxj05ra1yh2z9knzvcayd3zwqgl39gna0gm0xp290cyw5mnnb"))))
+ (build-system pyproject-build-system)
(arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (replace 'build
- (lambda _
- ;; Set file modification times to the early 80's because
- ;; the Zip format does not support earlier timestamps.
- (setenv "SOURCE_DATE_EPOCH"
- (number->string (* 10 366 24 60 60)))
- (invoke "python" "-m" "build" "--wheel"
- "--no-isolation" ".")))
- (replace 'check
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "SLAPD" (search-input-file inputs "/libexec/slapd"))
- (setenv "SCHEMA"
- (search-input-directory inputs "etc/openldap/schema"))
- (invoke "python" "-m" "django" "test"
- "--settings" "tests.settings")))
- (replace 'install
- (lambda _
- (let ((whl (car (find-files "dist" "\\.whl$"))))
- (invoke "pip" "--no-cache-dir" "--no-input"
- "install" "--no-deps" "--prefix" #$output whl)))))))
- (native-inputs
- (list openldap python-wheel python-setuptools-scm python-toml
-
- ;; These can be removed after <https://bugs.gnu.org/46848>.
- python-pypa-build python-pip))
- (propagated-inputs
- (list python-django python-ldap))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "SLAPD"
+ (search-input-file inputs "/libexec/slapd"))
+ (setenv "SCHEMA"
+ (search-input-directory inputs "etc/openldap/schema"))
+ (invoke "python"
+ "-m" "django" "test"
+ "--settings" "tests.settings"))))))
+ (native-inputs (list openldap python-setuptools))
+ (propagated-inputs (list python-django python-ldap))
(home-page "https://github.com/django-auth-ldap/django-auth-ldap")
(synopsis "Django LDAP authentication backend")
(description
@@ -1807,19 +1960,25 @@ backends in a single library.")
(define-public python-django-logging-json
(package
(name "python-django-logging-json")
- (version "1.15")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "django-logging-json" version))
- (sha256
- (base32
- "06041a8icazzp73kg93c7k1ska12wvkq7fpcad0l0sm1qnxx5yx7"))))
- (build-system python-build-system)
+ (version "1.16")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cipriantarta/django-logging")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1big7mv0274wgbr06v2qlq61pzh7h2rcn0la212shnh5b4fvhg56"))))
+ (build-system pyproject-build-system)
(arguments
- '(#:tests? #f ;no tests
- #:phases (modify-phases %standard-phases
- ;; Importing this module requires a Django project.
- (delete 'sanity-check))))
+ (list
+ #:tests? #f ;no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Importing this module requires a Django project.
+ (delete 'sanity-check))))
+ (native-inputs (list python-setuptools))
(propagated-inputs
(list python-certifi python-django python-elasticsearch python-six))
(home-page "https://github.com/cipriantarta/django-logging")
@@ -1834,14 +1993,30 @@ to ElasticSearch.")
(package
(name "python-django-netfields")
(version "1.3.2")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "django-netfields" version))
- (sha256
- (base32
- "0q2s6b689hwql4qcw02m3zj2fwsx1w4ffhw81yvp71dq3dh46jg5"))))
- (build-system python-build-system)
- (arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jimfunk/django-postgresql-netfields")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "176dmdlhd6bka4k6b4mlha3ags6mqf2qy3rxvpgnk9v5nncqm7l9"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:tests? #f ;XXX: Requires a running PostgreSQL server
+ ;; XXX: Requires rest_framework.
+ #:test-flags
+ #~(list "--ignore=test/tests/test_rest_framework_fields.py")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "DJANGO_SETTINGS_MODULE" "testsettings")
+ (setenv "PYTHONPATH" "."))))))
+ (native-inputs
+ (list python-pytest python-pytest-django python-setuptools))
(propagated-inputs
(list python-django python-netaddr python-psycopg2 python-six))
(home-page "https://github.com/jimfunk/django-postgresql-netfields")
@@ -1855,48 +2030,46 @@ to ElasticSearch.")
(package
(name "python-django-url-filter")
(version "0.3.15")
- (home-page "https://github.com/miki725/django-url-filter")
- (source (origin
- (method git-fetch)
- (uri (git-reference (url home-page) (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026"))
- (modules '((guix build utils)))
- (snippet
- ;; Patch for Django 4.0 compatibility, taken from upstream pull
- ;; request: https://github.com/miki725/django-url-filter/pull/103
- '(substitute* "url_filter/validators.py"
- ((" ungettext_lazy")
- " ngettext_lazy")))))
- (build-system python-build-system)
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/miki725/django-url-filter")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026"))))
+ (build-system pyproject-build-system)
(arguments
- '(#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'loosen-requirements
- (lambda _
- ;; Do not depend on compatibility package for old
- ;; Python versions.
- (substitute* "requirements.txt"
- (("enum-compat") ""))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (if tests?
- (begin
- (setenv "DJANGO_SETTINGS_MODULE"
- "test_project.settings")
- (invoke "pytest" "-vv" "--doctest-modules"
- "tests/" "url_filter/"))
- (format #t "test suite not run~%")))))))
- (propagated-inputs
- (list python-cached-property python-django python-six))
+ (list
+ #:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
+ #:test-flags #~(list "--doctest-modules" "tests/" "url_filter/")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'loosen-requirements
+ (lambda _
+ ;; Do not depend on compatibility package for old
+ ;; Python versions.
+ (substitute* "requirements.txt"
+ (("enum-compat")
+ ""))
+ ;; Patch for Django 4.0 compatibility, taken from upstream pull
+ ;; request: https://github.com/miki725/django-url-filter/pull/103
+ (substitute* "url_filter/validators.py"
+ ((" ungettext_lazy")
+ " ngettext_lazy"))))
+ (add-before 'check 'configure-tests
+ (lambda _
+ (setenv "DJANGO_SETTINGS_MODULE" "test_project.settings"))))))
+ (native-inputs (list python-mock python-pytest python-setuptools python-sqlalchemy))
+ (propagated-inputs (list python-cached-property python-django python-six))
+ (home-page "https://github.com/miki725/django-url-filter")
(synopsis "Filter data via human-friendly URLs")
(description
"The main goal of Django URL Filter is to provide an easy URL interface
for filtering data. It allows the user to safely filter by model attributes
-and also specify the lookup type for each filter (very much like
-Django's filtering system in ORM).")
+and also specify the lookup type for each filter (very much like Django's
+filtering system in ORM).")
(license license:expat)))
(define-public python-django-svg-image-form-field
@@ -1912,7 +2085,9 @@ Django's filtering system in ORM).")
(file-name (git-file-name name version))
(sha256
(base32 "131m545khn8l20j4x2bvlvz36dlbnhj9pc98i2dw72s3bw8pgws0"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ; No tests.
+ (native-inputs (list python-setuptools))
(propagated-inputs
(list python-defusedxml python-django python-pillow))
(home-page "https://github.com/artrey/django-svg-image-form-field")
@@ -1943,6 +2118,35 @@ image files already supported by it.")
variables to configure your Django application.")
(license license:expat)))
+(define-public python-django-widget-tweaks
+ (package
+ (name "python-django-widget-tweaks")
+ (version "1.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django-widget-tweaks" version))
+ (sha256
+ (base32 "1ir9qrygb0bsi53sqxs7052i5gpbzz3h8j3m5j94x6dv3rl8088w"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "django" "test"
+ "--settings=tests.settings")))))))
+ (native-inputs (list python-setuptools python-wheel))
+ (propagated-inputs (list python-django))
+ (home-page "https://github.com/jazzband/django-widget-tweaks")
+ (synopsis "Tweak the form field rendering in Django templates")
+ (description
+ "This package provides a way to tweak the form field rendering in
+templates and not in python-level form definitions.")
+ (license license:expat)))
+
(define-public python-django-cleanup
(package
(name "python-django-cleanup")